From 1e9b44833c76b1845f0a0584020101ec2fb76780 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 20 Mar 2024 02:47:51 +0100 Subject: [PATCH] Add basic GET /calendar test. --- tests/test_days.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() -- 2.30.2