home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
On GET /day with unknown (but valid) "?date=", create new Day.
[plomtask]
/
tests
/
test_days.py
diff --git
a/tests/test_days.py
b/tests/test_days.py
index 35380c690f65c5fa18029311f5c7446667c1f116..04f667bfb88dbbae58087399dde3aae1daf251a7 100644
(file)
--- a/
tests/test_days.py
+++ b/
tests/test_days.py
@@
-116,8
+116,9
@@
class TestsWithServer(TestsWithDB):
"""Test /day response."""
conn = HTTPConnection(*self.httpd.server_address)
conn.request('GET', '/day')
"""Test /day response."""
conn = HTTPConnection(*self.httpd.server_address)
conn.request('GET', '/day')
- response = conn.getresponse()
- self.assertEqual(response.status, 200)
+ self.assertEqual(conn.getresponse().status, 200)
+ conn.request('GET', '/day?date=FOO')
+ self.assertEqual(conn.getresponse().status, 400)
def tearDown(self):
self.httpd.shutdown()
def tearDown(self):
self.httpd.shutdown()