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)
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)