darkhttpd/devel/test_server_id.py
2016-01-23 20:05:02 +11:00

18 lines
512 B
Python
Executable File

#!/usr/bin/env python
# This is run by the "run-tests" script.
import unittest
from test import TestHelper, Conn, parse
class TestForward(TestHelper):
def test_no_server_id(self):
resp = Conn().get("/", method = 'BOGUS')
status, hdrs, body = parse(resp)
self.assertContains(status, "400 Bad Request")
self.assertFalse(hdrs.has_key("Server"))
self.assertFalse("Generated by darkhttpd/" in body)
if __name__ == '__main__':
unittest.main()
# vim:set ts=4 sw=4 et: