utils.py 261 B

12345678910
  1. from unittest import skipIf
  2. from django.conf import settings
  3. def skipIfCustomUser(test_func):
  4. """
  5. Skip a test if a custom user model is in use.
  6. """
  7. return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)