From: Christian Heller Date: Sun, 28 Apr 2024 22:53:54 +0000 (+0200) Subject: Extend Condition tests. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/static/templates?a=commitdiff_plain;h=3bf943fedc1e0e67a010dd9f1a5fb8791c390a75;p=plomtask Extend Condition tests. --- diff --git a/tests/conditions.py b/tests/conditions.py index 6538e87..db6c745 100644 --- a/tests/conditions.py +++ b/tests/conditions.py @@ -62,6 +62,11 @@ class TestsWithServer(TestCaseWithServer): form_data = {'title': 'foo', 'description': 'foo'} self.check_post(form_data, '/condition', 302, '/condition?id=1') self.assertEqual(1, len(Condition.all(self.db_conn))) + form_data['delete'] = '' + self.check_post(form_data, '/condition?id=', 404) + self.check_post(form_data, '/condition?id=2', 404) + self.check_post(form_data, '/condition?id=1', 302, '/conditions') + self.assertEqual(0, len(Condition.all(self.db_conn))) def test_do_GET(self) -> None: """Test /condition and /conditions response codes."""