diff --git a/tests/test_http_request.py b/tests/test_http_request.py index 5dea29b..6768e9e 100644 --- a/tests/test_http_request.py +++ b/tests/test_http_request.py @@ -9,12 +9,9 @@ import http_strategies from http_base import DaphneTestCase -class TestHTTPRequestSpec(DaphneTestCase): +class TestHTTPRequest(DaphneTestCase): """ - Tests which try to pour the HTTP request section of the ASGI spec into code. - The heavy lifting is done by the assert_valid_http_request_message function, - the tests mostly serve to wire up hypothesis so that it exercise it's power to find - edge cases. + Tests the HTTP request handling. """ def assert_valid_http_scope( @@ -178,7 +175,7 @@ class TestHTTPRequestSpec(DaphneTestCase): request_body, ): """ - Throw everything at channels that we dare. The idea is that if a combination + Throw everything at Daphne that we dare. The idea is that if a combination of method/path/headers/body would break the spec, hypothesis will eventually find it. """ scope, messages = self.run_daphne_request( diff --git a/tests/test_http_response.py b/tests/test_http_response.py index 88ee0f5..4da453b 100644 --- a/tests/test_http_response.py +++ b/tests/test_http_response.py @@ -1,17 +1,14 @@ # coding: utf8 -from hypothesis import given, assume, settings +from hypothesis import given, settings import http_strategies from http_base import DaphneTestCase -class TestHTTPResponseSpec(DaphneTestCase): +class TestHTTPResponse(DaphneTestCase): """ - Tests which try to pour the HTTP request section of the ASGI spec into code. - The heavy lifting is done by the assert_valid_http_request_message function, - the tests mostly serve to wire up hypothesis so that it exercise it's power to find - edge cases. + Tests HTTP response handling. """ def normalize_headers(self, headers): diff --git a/tests/test_websocket.py b/tests/test_websocket.py index bf2af70..16c7374 100644 --- a/tests/test_websocket.py +++ b/tests/test_websocket.py @@ -11,10 +11,7 @@ from http_base import DaphneTestCase, DaphneTestingInstance class TestWebsocket(DaphneTestCase): """ - Tests which try to pour the HTTP request section of the ASGI spec into code. - The heavy lifting is done by the assert_valid_http_request_message function, - the tests mostly serve to wire up hypothesis so that it exercise it's power to find - edge cases. + Tests WebSocket handshake, send and receive. """ def assert_valid_websocket_scope(