summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorChristopher Luc <chris.luc93@gmail.com>2015-04-06 12:02:34 -0700
committerTim Graham <timograham@gmail.com>2015-04-07 09:45:32 -0400
commite37d52bd5eb98e6ddf61b766720583481d18bc2b (patch)
tree9335d4ee56bcb827bc526fdd8052e0b71ce3d90f /django
parentf9c212d09ad59cd5b5d9be06e92be87d44c75d95 (diff)
Fixed #22993 -- Deprecated skipIfCustomUser decorator
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/tests/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/utils.py b/django/contrib/auth/tests/utils.py
index 09b34156b5..ba030d632c 100644
--- a/django/contrib/auth/tests/utils.py
+++ b/django/contrib/auth/tests/utils.py
@@ -1,10 +1,16 @@
+import warnings
from unittest import skipIf
from django.conf import settings
+from django.utils.deprecation import RemovedInDjango21Warning
def skipIfCustomUser(test_func):
"""
Skip a test if a custom user model is in use.
"""
+ warnings.warn(
+ "django.contrib.auth.tests.utils.skipIfCustomUser is deprecated.",
+ RemovedInDjango21Warning, stacklevel=2)
+
return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)