From e784b5e594946acabe1fe41c4d4d7fdc17f4a1cb Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 30 Oct 2012 10:27:01 +0800 Subject: [PATCH] [1.5.X] Added some test guards for some recently added auth tests. Refs #19061, #19057. --- django/contrib/auth/tests/handlers.py | 1 + django/contrib/auth/tests/models.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/django/contrib/auth/tests/handlers.py b/django/contrib/auth/tests/handlers.py index a867aae47ad..4b36ba3c131 100644 --- a/django/contrib/auth/tests/handlers.py +++ b/django/contrib/auth/tests/handlers.py @@ -17,6 +17,7 @@ class ModWsgiHandlerTestCase(TransactionTestCase): group = Group.objects.create(name='test_group') user1.groups.add(group) + @skipIfCustomUser def test_check_password(self): """ Verify that check_password returns the correct values as per diff --git a/django/contrib/auth/tests/models.py b/django/contrib/auth/tests/models.py index cb7d8888fef..ca65dee71b6 100644 --- a/django/contrib/auth/tests/models.py +++ b/django/contrib/auth/tests/models.py @@ -100,11 +100,13 @@ class UserManagerTestCase(TestCase): 'The given username must be set', User.objects.create_user, username='') + class IsActiveTestCase(TestCase): """ Tests the behavior of the guaranteed is_active attribute """ + @skipIfCustomUser def test_builtin_user_isactive(self): user = User.objects.create(username='foo', email='foo@bar.com') # is_active is true by default