Code

Ticket #19050: customuser.diff

File customuser.diff, 1.1 KB (added by ivan_virabyan, 19 months ago)

skip tests when custom user is used

Line 
1diff --git a/django/contrib/auth/tests/handlers.py b/django/contrib/auth/tests/handlers.py
2index 190fcee..75eeca3 100644
3--- a/django/contrib/auth/tests/handlers.py
4+++ b/django/contrib/auth/tests/handlers.py
5@@ -2,6 +2,7 @@ from __future__ import unicode_literals
6 
7 from django.contrib.auth.handlers.modwsgi import check_password, groups_for_user
8 from django.contrib.auth.models import User, Group
9+from django.contrib.auth.tests.utils import skipIfCustomUser
10 from django.test import TransactionTestCase
11 
12 
13@@ -17,6 +18,7 @@ class ModWsgiHandlerTestCase(TransactionTestCase):
14         group = Group.objects.create(name='test_group')
15         user1.groups.add(group)
16 
17+    @skipIfCustomUser
18     def test_check_password(self):
19         """
20         Verify that check_password returns the correct values as per
21@@ -32,6 +34,7 @@ class ModWsgiHandlerTestCase(TransactionTestCase):
22         # Valid user with incorrect password
23         self.assertFalse(check_password({}, 'test', 'incorrect'))
24 
25+    @skipIfCustomUser
26     def test_groups_for_user(self):
27         """
28         Check that groups_for_user returns correct values as per