Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove noise
  • Loading branch information
rayluo committed Sep 23, 2019
commit d131202128b302d0dcffcf71c6ac81438d10dcd5
9 changes: 4 additions & 5 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,8 @@ def setUp(self):
"token_endpoint": "https://{}/common/oauth2/v2.0/token".format(
self.environment_in_cache),
"response": TokenCacheTestCase.build_response(
uid=uid,
utid=utid,
access_token=self.access_token,
refresh_token="some refresh token"),
uid=uid, utid=utid,
access_token=self.access_token, refresh_token="some refresh token"),
}) # The add(...) helper populates correct home_account_id for future searching

def test_get_accounts(self):
Expand All @@ -194,4 +192,5 @@ def test_acquire_token_silent(self):
authority=self.authority_url_in_app, token_cache=self.cache)
at = app.acquire_token_silent(self.scopes, self.account)
self.assertNotEqual(None, at)
self.assertEqual(self.access_token, at.get('access_token'))
self.assertEqual(self.access_token, at.get('access_token'))

4 changes: 2 additions & 2 deletions tests/test_token_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def build_id_token(
@staticmethod
def build_response( # simulate a response from AAD
uid=None, utid=None, # If present, they will form client_info
access_token=None, expires_in=3600,
token_type="some type",
access_token=None, expires_in=3600, token_type="some type",
refresh_token=None,
foci=None,
id_token=None, # or something generated by build_id_token()
Expand Down Expand Up @@ -206,6 +205,7 @@ def testAddByAdfs(self):
"appmetadata-fs.msidlab8.com-my_client_id")
)


class SerializableTokenCacheTestCase(TokenCacheTestCase):
# Run all inherited test methods, and have extra check in tearDown()

Expand Down