From: Christian Heller Date: Wed, 20 Mar 2024 01:47:51 +0000 (+0100) Subject: Add basic GET /calendar test. X-Git-Url: https://plomlompom.com/repos/error?a=commitdiff_plain;h=1e9b44833c76b1845f0a0584020101ec2fb76780;p=plomtask Add basic GET /calendar test. --- diff --git a/tests/test_days.py b/tests/test_days.py index d0accbc..7e06198 100644 --- a/tests/test_days.py +++ b/tests/test_days.py @@ -112,8 +112,8 @@ class TestsWithServer(TestsWithDB): self.server_thread.daemon = True self.server_thread.start() - def test_do_GET_day(self): - """Test /day response.""" + def test_do_GET(self): + """Test /day and /calendar response codes.""" conn = HTTPConnection(*self.httpd.server_address) conn.request('GET', '/day') self.assertEqual(conn.getresponse().status, 200) @@ -121,6 +121,8 @@ class TestsWithServer(TestsWithDB): self.assertEqual(conn.getresponse().status, 200) conn.request('GET', '/day?date=FOO') self.assertEqual(conn.getresponse().status, 400) + conn.request('GET', '/calendar') + self.assertEqual(conn.getresponse().status, 200) def tearDown(self): self.httpd.shutdown()