#14632 closed (fixed)
Bug - testing framework fails when contrib.auth not in settings.
Reported by: | Michael Angeletti | Owned by: | Gregor Müllegger |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | tests, sprintnov13 | |
Cc: | baxterstockman@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
What happens is that all tests fail with some some of "no table auth_user".
Repeatable steps:create new project and run manage.py test
.
Google groups message - http://groups.google.com/group/django-developers/browse_thread/thread/f0a3db40338b0bd5
Attachments (1)
Change History (8)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
It appears that the tests haven't changed since the decoupling of messages from auth. In contrib\messages\tests\user_messages.py on line 13 and 39, you'll see setUp()
attempting to attache a user to TestCase, at which point DataBaseError is raised, if auth not in settings.INSTALLED_APPS.
Sorry if this is annoying and redundant information. I just thought it'd help to not have to reproduce the problem, if I included some more details.
comment:3 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 14 years ago
Owner: | changed from | to
---|
by , 14 years ago
Attachment: | issue14632.1.diff added |
---|
Skipping tests that depend on working User.objects.create(...)
comment:5 by , 14 years ago
Has patch: | set |
---|---|
Keywords: | sprintnov13 added |
Triage Stage: | Accepted → Ready for checkin |
A new project created with startproject
and 'django.contrib.auth'
removed from INSTALLED_APPS should pass all tests now and skip these that depend on django.contrib.auth in django.contrib.messages.
Github commit: https://github.com/gregmuellegger/django/commit/af3090bac514716c5455ab1f7b1fbe5813a67be7
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Forgot to add: Remove auth from installed apps.