From 81f5d4a1a7b955afe530d5292726b3a8a93d7038 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 30 Oct 2012 10:27:01 +0800 Subject: [PATCH] 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 a867aae47a..4b36ba3c13 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 cb7d8888fe..ca65dee71b 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