summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/django/contrib/auth/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/django/contrib/auth/tests/utils.py')
-rw-r--r--lib/python2.7/site-packages/django/contrib/auth/tests/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/python2.7/site-packages/django/contrib/auth/tests/utils.py b/lib/python2.7/site-packages/django/contrib/auth/tests/utils.py
new file mode 100644
index 0000000..6bb3d99
--- /dev/null
+++ b/lib/python2.7/site-packages/django/contrib/auth/tests/utils.py
@@ -0,0 +1,9 @@
+from django.conf import settings
+from django.utils.unittest import skipIf
+
+
+def skipIfCustomUser(test_func):
+ """
+ Skip a test if a custom user model is in use.
+ """
+ return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)