home · contact · privacy
Minor tests refactoring.
[plomtask] / tests / conditions.py
index db6c745da7a0fd6c4b7afbe9ac740f45fbf2572e..40d7c486fe7b05f2ed7f447e2cf58cd435546ebb 100644 (file)
@@ -70,8 +70,7 @@ class TestsWithServer(TestCaseWithServer):
 
     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', 500)
-        self.check_get('/condition?id=FOO', 400)
+        form_data = {'title': 'foo', 'description': 'foo'}
+        self.check_post(form_data, '/condition', 302, '/condition?id=1')
+        self.check_get_defaults('/condition')
         self.check_get('/conditions', 200)