Better debugging

This commit is contained in:
Simon Willison 2023-05-08 17:50:12 -07:00
commit 8b86fb7fb4

View file

@ -16,6 +16,9 @@ class TestResponse:
def status(self):
return self.httpx_response.status_code
def __repr__(self):
return "<TestResponse {} [{}]>".format(self.httpx_response.url, self.status)
# Supports both for test-writing convenience
@property
def status_code(self):