Ejemplo n.º 1
0
 def test_lookup_by_deactive_user_not_possible(self):
     frank = auth_models.User.objects.get(id=6)
     self.assertEquals(set(), set([repo.id for repo in Repository.lookup_by_user(frank)]))
Ejemplo n.º 2
0
 def test_lookup_by_user_without_extra_admin(self):
     frank = auth_models.User.objects.get(id=4)
     self.assertEquals(set([3]), set([repo.id for repo in Repository.lookup_by_user(frank)]))
Ejemplo n.º 3
0
 def test_lookup_by_user_with_multiple_groups(self):
     brandon = auth_models.User.objects.get(id=2)
     self.assertEquals(set([1, 3]), set([repo.id for repo in Repository.lookup_by_user(brandon)]))
Ejemplo n.º 4
0
 def test_lookup_by_user_with_extra_admin(self):
     charles = auth_models.User.objects.get(id=3)
     self.assertEquals(set([2, 3]), set([repo.id for repo in Repository.lookup_by_user(charles)]))
Ejemplo n.º 5
0
 def test_lookup_by_deactive_user_not_possible(self):
     frank = auth_models.User.objects.get(id=6)
     self.assertEquals(
         set(), set([repo.id for repo in Repository.lookup_by_user(frank)]))
Ejemplo n.º 6
0
 def test_lookup_by_user_with_multiple_groups(self):
     brandon = auth_models.User.objects.get(id=2)
     self.assertEquals(
         set([1, 3]),
         set([repo.id for repo in Repository.lookup_by_user(brandon)]))
Ejemplo n.º 7
0
 def test_lookup_by_user_without_extra_admin(self):
     frank = auth_models.User.objects.get(id=4)
     self.assertEquals(
         set([3]),
         set([repo.id for repo in Repository.lookup_by_user(frank)]))
Ejemplo n.º 8
0
 def test_lookup_by_user_with_extra_admin(self):
     charles = auth_models.User.objects.get(id=3)
     self.assertEquals(
         set([2, 3]),
         set([repo.id for repo in Repository.lookup_by_user(charles)]))