mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Update tests after adding slash to href for directories.
This commit is contained in:
parent
1e4cddb6b6
commit
1f166293b7
@ -120,7 +120,7 @@ class TestHelper(unittest.TestCase):
|
||||
|
||||
def assertIsIndex(self, body, path):
|
||||
self.assertContains(body,
|
||||
'<a href="..">..</a>/',
|
||||
'<a href="../">..</a>/',
|
||||
'Generated by darkhttpd')
|
||||
|
||||
def assertIsInvalid(self, body, path):
|
||||
@ -178,8 +178,8 @@ class TestDirList(TestHelper):
|
||||
resp = self.get("/")
|
||||
status, hdrs, body = parse(resp)
|
||||
self.assertLess(b'(', b'..') # ( sorts before ..
|
||||
paren_pos = body.index(b'<a href="%28">(</a>/')
|
||||
dotdot_pos = body.index(b'<a href="..">..</a>/')
|
||||
paren_pos = body.index(b'<a href="%28/">(</a>/')
|
||||
dotdot_pos = body.index(b'<a href="../">..</a>/')
|
||||
# But we special-case .. to come first
|
||||
self.assertLess(dotdot_pos, paren_pos)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user