home
·
contact
·
privacy
projects
/
plomtask
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef0f4f9
)
Extend Condition tests.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 28 Apr 2024 22:53:54 +0000
(
00:53
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 28 Apr 2024 22:53:54 +0000
(
00:53
+0200)
tests/conditions.py
patch
|
blob
|
history
diff --git
a/tests/conditions.py
b/tests/conditions.py
index 6538e87019bfa7bffa0d8fccb22f8981500943d1..db6c745da7a0fd6c4b7afbe9ac740f45fbf2572e 100644
(file)
--- 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 = {'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."""
def test_do_GET(self) -> None:
"""Test /condition and /conditions response codes."""