• Home
  • Raw
  • Download

Lines Matching refs:response

8     response = tests.http_response_bytes(
11 with tests.server_const_bytes(response) as uri:
12 response, content = http.request(uri, "HEAD")
13 assert response.status == 200
14 assert int(response["content-length"]) != 0
21 response = tests.http_response_bytes(
25 with tests.server_const_bytes(response) as uri:
26 response, content = http.request(uri, "GET")
27 assert response.status == 200
28 assert "content-encoding" not in response
29 assert "-content-encoding" in response
30 assert int(response["content-length"]) == len(b"properly compressed")
36 response = tests.http_response_bytes(
40 with tests.server_const_bytes(response) as uri:
41 response, content = http.request(uri, "POST", body=b"")
42 assert response.status == 200
43 assert "content-encoding" not in response
44 assert "-content-encoding" in response
51 response = tests.http_response_bytes(
54 with tests.server_const_bytes(response, request_count=2) as uri:
61 response, content = http.request(uri, "GET")
62 assert response.status == 500
63 assert response.reason.startswith("Content purported")
69 response = tests.http_response_bytes(
73 with tests.server_const_bytes(response) as uri:
74 response, content = http.request(uri, "GET")
75 assert response.status == 200
76 assert "content-encoding" not in response
77 assert int(response["content-length"]) == len(b"properly compressed")
85 response = tests.http_response_bytes(
88 with tests.server_const_bytes(response, request_count=2) as uri:
95 response, content = http.request(uri, "GET")
96 assert response.status == 500
97 assert response.reason.startswith("Content purported")