This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from allauth.socialaccount.tests import OAuth2TestsMixin
from allauth.tests import MockedResponse, TestCase
from .provider import BitlyProvider
class BitlyTests(OAuth2TestsMixin, TestCase):
provider_id = BitlyProvider.id
def get_mocked_response(self):
return MockedResponse(
200,
"""{
"data": {
"apiKey": "R_f6397a37e765574f2e198dba5bb59522",
"custom_short_domain": null,
"display_name": null,
"full_name": "Bitly API Oauth Demo Account",
"is_enterprise": false,
"login": "bitlyapioauthdemo",
"member_since": 1331567982,
"profile_image": "http://bitly.com/u/bitlyapioauthdemo.png",
"profile_url": "http://bitly.com/u/bitlyapioauthdemo",
"share_accounts": [],
"tracking_domains": []
},
"status_code": 200,
"status_txt": "OK"
}""",
)