Exemple #1
0
 def test_returns_none_on_missing_identity(self):
     user = self._get_mock_user()
     p = IssuePlugin()
     p.auth_provider = 'test'
     self.assertEquals(p.get_auth_for_user(user), None)
Exemple #2
0
 def test_returns_identity(self):
     user = User.objects.create(username='******', email='*****@*****.**')
     auth = UserSocialAuth.objects.create(provider='test', user=user)
     p = IssuePlugin()
     p.auth_provider = 'test'
     self.assertEquals(p.get_auth_for_user(user), auth)
Exemple #3
0
 def test_requires_auth_provider(self):
     user = self._get_mock_user()
     p = IssuePlugin()
     self.assertRaises(AssertionError, p.get_auth_for_user, user)