def test_to_from_json(self): c = AppAssertionCredentials( scope=['http://example.com/a', 'http://example.com/b']) json = c.to_json() c2 = Credentials.new_from_json(json) self.assertEqual(c.access_token, c2.access_token)
def test_to_json_and_from_json(self): credentials = AppAssertionCredentials( scope=['http://example.com/a', 'http://example.com/b']) json = credentials.to_json() credentials_from_json = Credentials.new_from_json(json) self.assertEqual(credentials.access_token, credentials_from_json.access_token)
def test_to_from_json(self): c = AppAssertionCredentials(scope=['http://example.com/a', 'http://example.com/b']) json = c.to_json() c2 = Credentials.new_from_json(json) self.assertEqual(c.access_token, c2.access_token)