2017-04-15 12:46:22 +00:00
|
|
|
|
|
|
|
class MockResponse:
|
2017-04-18 14:16:24 +00:00
|
|
|
def __init__(self, response_data={}, ok=True, is_redirect=False):
|
2017-04-15 12:46:22 +00:00
|
|
|
self.response_data = response_data
|
2017-04-18 14:16:24 +00:00
|
|
|
self.ok = ok
|
|
|
|
self.is_redirect = is_redirect
|
2017-04-15 12:46:22 +00:00
|
|
|
|
|
|
|
def raise_for_status(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def json(self):
|
|
|
|
return self.response_data
|