witchie/tests/utils.py
Ivan Habunek 3f44d560c8
Store access tokens for multiple instances
This makes it so an app is created only once for each instance, instead
of being re-created on each login. Prevents accumulations of authroized
apps in https://mastodon.social/oauth/authorized_applications
2017-04-18 16:16:24 +02:00

12 lines
295 B
Python

class MockResponse:
def __init__(self, response_data={}, ok=True, is_redirect=False):
self.response_data = response_data
self.ok = ok
self.is_redirect = is_redirect
def raise_for_status(self):
pass
def json(self):
return self.response_data