Opened 11 years ago
Last modified 11 years ago
#21831 closed Bug
Cannot run tests without contrib.auth in INSTALLED_APPS — at Initial Version
Reported by: | Carl Meyer | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This is a result of the interaction of d818e0c9b2b88276cc499974f9eee893170bf0a8 (the new checks framework) and #20915 (the dependency that django.test
has on django.contrib.auth
).
django.test
imports a number of login/logout-related methods from contrib.auth, in order to support auth-related features of the test client.
The check_user_model
check for contrib.auth is registered in django/contrib/auth/__init__.py
as a side effect of importing anything from within django.contrib.auth
.
Actually executing the check_user_model
check when contrib.auth is not installed results in "LookupError: No installed app with label 'auth'." on the cls = apps.get_model(app_name, model_name)
line.