* Fixed response repr.
* Fixed response repr tests.
return self._cookies
def __repr__(self) -> str:
- return f"<Response [{self.status_code} {self.reason_phrase}])>"
+ return f"<Response [{self.status_code} {self.reason_phrase}]>"
class AsyncResponse(BaseResponse):
assert response.text == "Hello, world!"
assert response.protocol == "HTTP/1.1"
assert response.headers
- assert repr(response) == "<Response [200 OK])>"
+ assert repr(response) == "<Response [200 OK]>"
@pytest.mark.asyncio
assert response.request.url == http3.URL(url)
assert response.headers
assert response.is_redirect is False
- assert repr(response) == "<Response [200 OK])>"
+ assert repr(response) == "<Response [200 OK]>"
@threadpool
def test_response_repr():
response = http3.Response(200, content=b"Hello, world!")
- assert repr(response) == "<Response [200 OK])>"
+ assert repr(response) == "<Response [200 OK]>"
def test_response_content_type_encoding():