From 6a80bdafa6cab506164ca7a7fc89b66c4bea43b4 Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Sat, 10 Jun 2017 09:48:30 -0700 Subject: [PATCH] add unit tests --- tests/test_request_stream.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_request_stream.py b/tests/test_request_stream.py index fdfffb77..4ca4e44e 100644 --- a/tests/test_request_stream.py +++ b/tests/test_request_stream.py @@ -185,6 +185,11 @@ def test_request_stream_handle_exception(): assert response.status == 404 assert response.text == 'Error: Requested URL /in_valid_post not found' + # 405 + request, response = app.test_client.get('/post/random_id', data=data) + assert response.status == 405 + assert response.text == 'Error: Method GET not allowed for URL /post/random_id' + def test_request_stream_blueprint(): '''for self.is_request_stream = True'''