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