home · contact · privacy
On GET /day with unknown (but valid) "?date=", create new Day.
[plomtask] / tests / test_days.py
index 35380c690f65c5fa18029311f5c7446667c1f116..04f667bfb88dbbae58087399dde3aae1daf251a7 100644 (file)
@@ -116,8 +116,9 @@ class TestsWithServer(TestsWithDB):
         """Test /day response."""
         conn = HTTPConnection(*self.httpd.server_address)
         conn.request('GET', '/day')
-        response = conn.getresponse()
-        self.assertEqual(response.status, 200)
+        self.assertEqual(conn.getresponse().status, 200)
+        conn.request('GET', '/day?date=FOO')
+        self.assertEqual(conn.getresponse().status, 400)
 
     def tearDown(self):
         self.httpd.shutdown()