Ticket #18093: 18093.diff

File 18093.diff, 871 bytes (added by Stephen Muss, 12 years ago)

Patch with test

  • django/contrib/auth/tests/basic.py

     
    5252    def test_anonymous_user(self):
    5353        "Check the properties of the anonymous user"
    5454        a = AnonymousUser()
     55        self.assertEqual(a.pk, None)
    5556        self.assertFalse(a.is_authenticated())
    5657        self.assertFalse(a.is_staff)
    5758        self.assertFalse(a.is_active)
  • django/contrib/auth/models.py

     
    406406
    407407class AnonymousUser(object):
    408408    id = None
     409    pk = None
    409410    username = ''
    410411    is_staff = False
    411412    is_active = False
Back to Top