mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 22:54:45 +00:00
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:
parent
caf8ba6297
commit
7f756ca40c
2 changed files with 9 additions and 0 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue