mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +03:00
Clean up comments, names and imports
This commit is contained in:
parent
567c27504d
commit
7fb3e9a167
|
@ -9,12 +9,9 @@ import http_strategies
|
||||||
from http_base import DaphneTestCase
|
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.
|
Tests the HTTP request handling.
|
||||||
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.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def assert_valid_http_scope(
|
def assert_valid_http_scope(
|
||||||
|
@ -178,7 +175,7 @@ class TestHTTPRequestSpec(DaphneTestCase):
|
||||||
request_body,
|
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.
|
of method/path/headers/body would break the spec, hypothesis will eventually find it.
|
||||||
"""
|
"""
|
||||||
scope, messages = self.run_daphne_request(
|
scope, messages = self.run_daphne_request(
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
# coding: utf8
|
# coding: utf8
|
||||||
|
|
||||||
from hypothesis import given, assume, settings
|
from hypothesis import given, settings
|
||||||
|
|
||||||
import http_strategies
|
import http_strategies
|
||||||
from http_base import DaphneTestCase
|
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.
|
Tests HTTP response handling.
|
||||||
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.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def normalize_headers(self, headers):
|
def normalize_headers(self, headers):
|
||||||
|
|
|
@ -11,10 +11,7 @@ from http_base import DaphneTestCase, DaphneTestingInstance
|
||||||
|
|
||||||
class TestWebsocket(DaphneTestCase):
|
class TestWebsocket(DaphneTestCase):
|
||||||
"""
|
"""
|
||||||
Tests which try to pour the HTTP request section of the ASGI spec into code.
|
Tests WebSocket handshake, send and receive.
|
||||||
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.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def assert_valid_websocket_scope(
|
def assert_valid_websocket_scope(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user