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."""