mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Don't include URL or method in default_reply.
This commit is contained in:
@@ -120,8 +120,6 @@ class TestHelper(unittest.TestCase):
|
||||
|
||||
def assertIsIndex(self, body, path):
|
||||
self.assertContains(body,
|
||||
"<title>%s</title>\n"%path,
|
||||
"<h1>%s</h1>\n"%path,
|
||||
'<a href="..">..</a>/',
|
||||
'Generated by darkhttpd')
|
||||
|
||||
@@ -129,21 +127,21 @@ class TestHelper(unittest.TestCase):
|
||||
self.assertContains(body,
|
||||
"<title>400 Bad Request</title>",
|
||||
"<h1>Bad Request</h1>\n",
|
||||
"You requested an invalid URL: %s\n"%path,
|
||||
"You requested an invalid URL.\n",
|
||||
'Generated by darkhttpd')
|
||||
|
||||
def assertNotFound(self, body, path):
|
||||
self.assertContains(body,
|
||||
"<title>404 Not Found</title>",
|
||||
"<h1>Not Found</h1>\n",
|
||||
"The URL you requested (%s) was not found.\n"%path,
|
||||
"The URL you requested was not found.\n",
|
||||
'Generated by darkhttpd')
|
||||
|
||||
def assertForbidden(self, body, path):
|
||||
self.assertContains(body,
|
||||
"<title>403 Forbidden</title>",
|
||||
"<h1>Forbidden</h1>\n",
|
||||
"You don't have permission to access (%s).\n"%path,
|
||||
"You don't have permission to access this URL.\n",
|
||||
'Generated by darkhttpd')
|
||||
|
||||
def assertUnreadable(self, body, path):
|
||||
|
||||
@@ -7,7 +7,7 @@ class TestForward(TestHelper):
|
||||
def test_no_server_id(self):
|
||||
resp = self.get('/', method = 'BOGUS')
|
||||
status, hdrs, body = parse(resp)
|
||||
self.assertContains(status, "400 Bad Request")
|
||||
self.assertContains(status, "501 Not Implemented")
|
||||
self.assertFalse('Server' in hdrs)
|
||||
self.assertFalse(b'Generated by darkhttpd/' in body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user