Beispiel #1
0
    def test_get_authenticated_acl(self):
        """get ACL for authenticated user"""
        test_user = User.objects.create_user('Bob', '*****@*****.**', 'pass123')
        acl = get_user_acl(test_user)

        self.assertTrue(acl)
        self.assertEqual(acl, test_user.acl)
Beispiel #2
0
    def test_get_anonymous_acl(self):
        """get ACL for unauthenticated user"""
        acl = get_user_acl(AnonymousUser())

        self.assertTrue(acl)
        self.assertEqual(acl, AnonymousUser().acl)
    def test_get_anonymous_acl(self):
        """get ACL for unauthenticated user"""
        acl = get_user_acl(AnonymousUser())

        self.assertTrue(acl)
        self.assertEqual(acl, AnonymousUser().acl_cache)