Ejemplo n.º 1
0
 def setUp(self):
     self.identity_provider_model = IdentityProvider.objects.create(type="vsts")
     self.identity = Identity.objects.create(
         idp=self.identity_provider_model,
         user=self.user,
         external_id="vsts_id",
         data={
             "access_token": "123456789",
             "token_type": "token_type",
             "expires": 12345678,
             "refresh_token": "n354678",
         },
     )
     self.provider = VSTSIdentityProvider()
     self.client_secret = "12345678"
     self.provider.get_oauth_client_secret = lambda: self.client_secret
Ejemplo n.º 2
0
 def setUp(self):
     self.identity_provider_model = IdentityProvider.objects.create(
         type='vsts')
     self.identity = Identity.objects.create(
         idp=self.identity_provider_model,
         user=self.user,
         external_id='vsts_id',
         data={
             'access_token': '123456789',
             'token_type': 'token_type',
             'expires': 12345678,
             'refresh_token': 'n354678',
         })
     self.provider = VSTSIdentityProvider()
     self.client_secret = '12345678'
     self.provider.get_oauth_client_secret = lambda: self.client_secret