Skip to content

Commit

Permalink
No need for DummyHttpResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed May 12, 2023
1 parent e1d2318 commit 3517aed
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/test_throttled_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@
logging.basicConfig(level=logging.DEBUG)


class DummyHttpResponse(MinimalResponse):
def __init__(self, headers=None, **kwargs):
self.headers = {} if headers is None else headers
super(DummyHttpResponse, self).__init__(**kwargs)


class DummyHttpClient(object):
def __init__(self, status_code=None, response_headers=None):
self._status_code = status_code
self._response_headers = response_headers

def _build_dummy_response(self):
return DummyHttpResponse(
return MinimalResponse(
status_code=self._status_code,
headers=self._response_headers,
text=random(), # So that we'd know whether a new response is received
Expand Down

0 comments on commit 3517aed

Please sign in to comment.