(self)
| 856 | self.assertIsNotNone(h.environ) |
| 857 | |
| 858 | def testRaisesControlCharacters(self): |
| 859 | for c0 in control_characters_c0(): |
| 860 | with self.subTest(c0): |
| 861 | base = BaseHandler() |
| 862 | with self.assertRaises(ValueError): |
| 863 | base.start_response(c0, [('x', 'y')]) |
| 864 | |
| 865 | base = BaseHandler() |
| 866 | with self.assertRaises(ValueError): |
| 867 | base.start_response('200 OK', [(c0, 'y')]) |
| 868 | |
| 869 | # HTAB (\x09) is allowed in header values, but not in names. |
| 870 | base = BaseHandler() |
| 871 | if c0 != "\t": |
| 872 | with self.assertRaises(ValueError): |
| 873 | base.start_response('200 OK', [('x', c0)]) |
| 874 | else: |
| 875 | base.start_response('200 OK', [('x', c0)]) |
| 876 | |
| 877 | |
| 878 | class TestModule(unittest.TestCase): |
nothing calls this directly
no test coverage detected