(self)
| 854 | self.fail("%s\n%s" % (e, getattr(e, "headers", ""))) |
| 855 | |
| 856 | def test_404(self): |
| 857 | # send POST with http.client, it should return 404 header and |
| 858 | # 'Not Found' message. |
| 859 | with contextlib.closing(http.client.HTTPConnection(ADDR, PORT)) as conn: |
| 860 | conn.request('POST', '/this-is-not-valid') |
| 861 | response = conn.getresponse() |
| 862 | |
| 863 | self.assertEqual(response.status, 404) |
| 864 | self.assertEqual(response.reason, 'Not Found') |
| 865 | |
| 866 | def test_introspection1(self): |
| 867 | expected_methods = set(['pow', 'div', 'my_function', 'add', 'têšt', |
nothing calls this directly
no test coverage detected