Debian Codegraph @

tests/apps/socialaccount/providers/doximity/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.doximity.provider import DoximityProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class DoximityTests(OAuth2TestsMixin, TestCase):
11 provider_id = DoximityProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "id": 41993552342,
19 "npi": 1952635229,
20 "firstname": "John",
21 "middlename": "Henry",
22 "maiden_name": null,
23 "lastname": "Smith",
24 "full_name": "Ahmed S Belal, MD",
25 "gender": "M",
26 "city": "San Francisco",
27 "state": "CA",
28 "zip": "94107",
29 "phone": "(650) 200-3901",
30 "fax": "888-416-8572",
31 "email": "[email protected]",
32 "address_1": "500 3rd St.",
33 "address_2": "Suite 510",
34 "lat": 42.3663926,
35 "lon": -71.051395,
36 "additional_locations": [{
37 "address_1": "12 Main st",
38 "address_2": null,
39 "city": "Cambridge",
40 "state": "MA",
41 "phone": "555-555-5555",
42 "fax": null,
43 "zip": "02138"
44 }],
45 "credentials": "MD",
46 "verified": true,
47 "description": "Chief of Cardiology",
48 "medical_school": "UCSF School of Medicine",
49 "residencies": ["Stanford Medical Center", "Mt Sinai Hospital"],
50 "specialty": "Cardiology",
51 "specialty_details": {
52 "abbr": "Cards",
53 "code": "CA00",
54 "credential_id": 4,
55 "name": "Cardiology",
56 "id": "CA00"
57 },
58 "hospitals": [{
59 "name": "Mills-Peninsula Health Services",
60 "aha_id": "6930315"
61 }],
62 "subspecialties": ["General Cardiology", "Cardiac Disease"],
63 "profile_photo": "https://s3.amazonaws.com/doximity_prod_uploads\
64 /profile_photos/7969/normal/profile.png",
65 "colleague_count": 142
66 }
67 """,
68 )
69
70 def get_expected_to_str(self):
71 return "[email protected]"