Пример #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)]))
Пример #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)]))
Пример #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)]))
Пример #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)]))
Пример #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)]))
Пример #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)]))
Пример #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)]))
Пример #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)]))