2021-01-17 09:29:23 +03:00
|
|
|
#!/usr/bin/env python3
|
2016-01-23 12:05:02 +03:00
|
|
|
# This is run by the "run-tests" script.
|
2013-04-28 18:55:08 +04:00
|
|
|
import unittest
|
|
|
|
from test import TestHelper, Conn, parse
|
|
|
|
|
|
|
|
class TestForward(TestHelper):
|
|
|
|
def test_no_server_id(self):
|
2021-01-17 09:29:23 +03:00
|
|
|
resp = self.get('/', method = 'BOGUS')
|
2013-04-28 18:55:08 +04:00
|
|
|
status, hdrs, body = parse(resp)
|
|
|
|
self.assertContains(status, "400 Bad Request")
|
2021-01-17 09:29:23 +03:00
|
|
|
self.assertFalse('Server' in hdrs)
|
|
|
|
self.assertFalse(b'Generated by darkhttpd/' in body)
|
2013-04-28 18:55:08 +04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|
|
|
|
|
|
|
|
# vim:set ts=4 sw=4 et:
|