Clean up comments, names and imports

This commit is contained in:
Andrew Godwin 2017-11-27 00:02:37 -08:00
parent 567c27504d
commit 7fb3e9a167
3 changed files with 7 additions and 16 deletions

View File

@ -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(

View File

@ -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):

View File

@ -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(