Added tests for application/xhtml+xml mime type parsing.

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3819 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2008-06-16 19:51:58 +00:00
parent caf8ba6297
commit 7f756ca40c
2 changed files with 9 additions and 0 deletions

View file

@ -44,6 +44,11 @@ class StoppableHttpRequestHandler (SimpleHTTPServer.SimpleHTTPRequestHandler, ob
"""
pass
# serve .xhtml files as application/xhtml+xml
StoppableHttpRequestHandler.extensions_map.update({
'.xhtml': 'application/xhtml+xml',
})
class StoppableHttpServer (BaseHTTPServer.HTTPServer, object):
"""

View file

@ -37,6 +37,10 @@ class TestHttp (httptest.HttpServerTest):
u"http.html" % self.port
resultlines = self.get_resultlines("http.html")
self.direct(url, resultlines, recursionlevel=1)
url = u"http://localhost:%d/tests/checker/data/" \
u"http.xhtml" % self.port
resultlines = self.get_resultlines("http.xhtml")
self.direct(url, resultlines, recursionlevel=1)
self.redirect1_http_test()
self.redirect2_http_test()
self.robots_txt_test()