home · contact · privacy
Perform sensible redirects on POSTs.
[plomtask] / tests / conditions.py
index 478124650bd7dd72d984920de105cab3dce033dd..3b95de1f3fe7e89cc30a14f149983d14ad690962 100644 (file)
@@ -43,13 +43,13 @@ class TestsWithServer(TestCaseWithServer):
     def test_do_POST_condition(self) -> None:
         """Test POST /condition and its effect on the database."""
         form_data = {'title': 'foo', 'description': 'foo'}
-        self.check_post(form_data, '/condition', 302, '/')
+        self.check_post(form_data, '/condition', 302, '/condition?id=1')
         self.assertEqual(1, len(Condition.all(self.db_conn)))
 
     def test_do_GET(self) -> None:
         """Test /condition and /conditions response codes."""
         self.check_get('/condition', 200)
         self.check_get('/condition?id=', 200)
-        self.check_get('/condition?id=0', 400)
+        self.check_get('/condition?id=0', 500)
         self.check_get('/condition?id=FOO', 400)
         self.check_get('/conditions', 200)