def handle(self, *args, **options):
     if len(args):
         for slug in args:
             for service in GitHubService.for_user(
                 User.objects.get(username=slug)
             ):
                 service.sync()
 def handle(self, *args, **options):
     if len(args):
         for slug in args:
             for service in GitHubService.for_user(
                 User.objects.get(username=slug)
             ):
                 service.sync()
 def setUp(self):
     self.user = fixture.get(User)
     self.socialaccount = fixture.get(
         SocialAccount,
         user=self.user,
         provider=GitHubOAuth2Adapter.provider_id,
     )
     self.token = fixture.get(
         SocialToken,
         account=self.socialaccount,
     )
     self.service = GitHubService.for_user(self.user)[0]
Beispiel #4
0
 def test_import_with_no_token(self):
     """User without a GitHub SocialToken does not return a service."""
     services = GitHubService.for_user(self.user)
     self.assertEqual(services, [])
Beispiel #5
0
 def test_import_with_no_token(self):
     '''User without a GitHub SocialToken does not return a service'''
     services = GitHubService.for_user(self.user)
     self.assertEqual(services, [])
 def test_import_with_no_token(self):
     '''User without a GitHub SocialToken does not return a service'''
     service = GitHubService.for_user(self.user)
     self.assertIsNone(service)
Beispiel #7
0
 def test_import_with_no_token(self):
     """User without a GitHub SocialToken does not return a service."""
     services = GitHubService.for_user(get(User))
     self.assertEqual(services, [])