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)