Skip to content

Commit 57c7cf8

Browse files
committed
Improve test coverage
1 parent 524f0e6 commit 57c7cf8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_web_response.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ def test_cookie_set_after_del(self):
257257
# check for Max-Age dropped
258258
self.assertEqual(str(resp.cookies), 'Set-Cookie: name=val')
259259

260+
def test_set_status_with_reason(self):
261+
req = self.make_request('GET', '/')
262+
resp = StreamResponse(req)
263+
264+
resp.set_status(200, "Everithing is fine!")
265+
self.assertEqual(200, resp.status)
266+
self.assertEqual("Everithing is fine!", resp.reason)
267+
260268

261269
class TestResponse(unittest.TestCase):
262270

0 commit comments

Comments
 (0)