diff --git a/tests/test_keep_alive_timeout.py b/tests/test_keep_alive_timeout.py index 3cb98771..15f6d705 100644 --- a/tests/test_keep_alive_timeout.py +++ b/tests/test_keep_alive_timeout.py @@ -68,7 +68,7 @@ class ReuseableSanicTestClient(SanicTestClient): import traceback traceback.print_tb(e2.__traceback__) exceptions.append(e2) - # Don't stop here! self.app.stop() + #Don't stop here! self.app.stop() if self._server is not None: _server = self._server @@ -266,3 +266,4 @@ def test_keep_alive_server_timeout(): assert isinstance(exception, ValueError) assert "Connection reset" in exception.args[0] or \ "got a new connection" in exception.args[0] + diff --git a/tests/test_middleware.py b/tests/test_middleware.py index a879834d..4d4d6901 100644 --- a/tests/test_middleware.py +++ b/tests/test_middleware.py @@ -75,7 +75,6 @@ def test_middleware_response_exception(): assert response.text == 'OK' assert result['status_code'] == 404 - def test_middleware_override_request(): app = Sanic('test_middleware_override_request') @@ -110,6 +109,7 @@ def test_middleware_override_response(): assert response.text == 'OK' + def test_middleware_order(): app = Sanic('test_middleware_order') @@ -146,4 +146,4 @@ def test_middleware_order(): request, response = app.test_client.get('/') assert response.status == 200 - assert order == [1, 2, 3, 4, 5, 6] + assert order == [1,2,3,4,5,6] diff --git a/tests/test_request_data.py b/tests/test_request_data.py index f9349427..f795ff1f 100644 --- a/tests/test_request_data.py +++ b/tests/test_request_data.py @@ -20,8 +20,7 @@ def test_storage(): @app.route('/') def handler(request): - return json({'user': request.get('user'), - 'sidekick': request.get('sidekick')}) + return json({'user': request.get('user'), 'sidekick': request.get('sidekick')}) request, response = app.test_client.get('/') diff --git a/tests/test_request_stream.py b/tests/test_request_stream.py index 8941c53e..4ca4e44e 100644 --- a/tests/test_request_stream.py +++ b/tests/test_request_stream.py @@ -188,8 +188,7 @@ def test_request_stream_handle_exception(): # 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' + assert response.text == 'Error: Method GET not allowed for URL /post/random_id' def test_request_stream_blueprint():