Skip to content

Commit

Permalink
Fixed wrong anonymous check
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszb committed Dec 11, 2013
1 parent 415c614 commit ed5617e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example_project/integration_tests/tests.py
@@ -1,5 +1,6 @@
from django.test import TestCase

from guardian.conf import settings
from guardian.compat import get_user_model
from guardian.management import create_anonymous_user

Expand All @@ -12,5 +13,5 @@ def test_create_anonymous_user(self):
create_anonymous_user(object())
self.assertEqual(1, User.objects.all().count())
anonymous = User.objects.all()[0]
self.assertTrue(anonymous.is_anonymous())
self.assertEqual(anonymous.pk, settings.ANONYMOUS_USER_ID)

0 comments on commit ed5617e

Please sign in to comment.