Exemplo n.º 1
0
 def test_issue_tracker_plugin(self):
     plugin_enabled.send(plugin=IssueTrackingPlugin2(),
                         project=self.project,
                         user=self.owner,
                         sender=type(self.project))
     feature_complete = FeatureAdoption.objects.get_by_slug(
         organization=self.organization, slug="issue_tracker_integration")
     assert feature_complete
Exemplo n.º 2
0
 def test_returns_identity(self):
     user = User.objects.create(username='******', email='*****@*****.**')
     auth = UserSocialAuth.objects.create(provider='test', user=user)
     p = IssueTrackingPlugin2()
     p.auth_provider = 'test'
     self.assertEquals(p.get_auth_for_user(user), auth)
Exemplo n.º 3
0
 def test_returns_none_on_missing_identity(self):
     user = self._get_mock_user()
     p = IssueTrackingPlugin2()
     p.auth_provider = 'test'
     self.assertEquals(p.get_auth_for_user(user), None)
Exemplo n.º 4
0
 def test_requires_auth_provider(self):
     user = self._get_mock_user()
     p = IssueTrackingPlugin2()
     self.assertRaises(AssertionError, p.get_auth_for_user, user)