home · contact · privacy
Add basic GET /calendar test.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 20 Mar 2024 01:47:51 +0000 (02:47 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 20 Mar 2024 01:47:51 +0000 (02:47 +0100)
tests/test_days.py

index d0accbc0d778a429ba2e741061b0fc35c50712c6..7e06198788c734aea2d44de50585bb859811b85e 100644 (file)
@@ -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()