mirror of
https://github.com/jamesroberts/fastwsgi.git
synced 2025-12-21 14:19:30 -06:00
Fixes failing tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import socket
|
import socket
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
BAD_REQUEST_RESPONSE = b"HTTP/1.1 400 Bad Request\r\n\r\n"
|
BAD_REQUEST_RESPONSE = b"HTTP/1.1 400 BAD_REQUEST\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"
|
||||||
|
|
||||||
raw_requests = [
|
raw_requests = [
|
||||||
"GET\r\n\r\n",
|
"GET\r\n\r\n",
|
||||||
@@ -17,4 +17,4 @@ def test_bad_requests(basic_test_server, raw_request):
|
|||||||
connection = socket.create_connection((host, port))
|
connection = socket.create_connection((host, port))
|
||||||
connection.send(raw_request.encode())
|
connection.send(raw_request.encode())
|
||||||
data = connection.recv(4096)
|
data = connection.recv(4096)
|
||||||
assert data == BAD_REQUEST_RESPONSE
|
assert data == BAD_REQUEST_RESPONSE
|
||||||
|
|||||||
Reference in New Issue
Block a user