home · contact · privacy
893d67e7c462ad2d3a0c02182acdd32e5c8ff5ac
[plomtask] / tests / misc.py
1 """Miscellaneous tests."""
2 from tests.utils import TestCaseWithServer
3
4
5 class TestsWithServer(TestCaseWithServer):
6     """Tests against our HTTP server/handler (and database)."""
7
8     def test_do_GET(self) -> None:
9         """Test / redirect, and unknown targets failing."""
10         self.conn.request('GET', '/')
11         self.check_redirect('/day')
12         self.check_get('/foo', 404)
13
14     def test_do_POST(self) -> None:
15         """Test POST to / and other unknown targets failing."""
16         self.check_post({}, '/', 404)
17         self.check_post({}, '/foo', 404)