示例#1
0
 def test_returns_identity(self):
     user = User.objects.create(username="******", email="*****@*****.**")
     auth = UserSocialAuth.objects.create(provider="test", user=user)
     p = IssueTrackingPlugin()
     p.auth_provider = "test"
     self.assertEquals(p.get_auth_for_user(user), auth)
示例#2
0
 def test_returns_none_on_missing_identity(self):
     user = self._get_mock_user()
     p = IssueTrackingPlugin()
     p.auth_provider = "test"
     self.assertEquals(p.get_auth_for_user(user), None)