Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#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)

issue14632.1.diff (3.0 KB ) - added by Gregor Müllegger 14 years ago.
Skipping tests that depend on working User.objects.create(...)

Download all attachments as: .zip

Change History (8)

comment:1 by Michael Angeletti, 14 years ago

Forgot to add: Remove auth from installed apps.

comment:2 by Michael Angeletti, 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 Gabriel Hurley, 14 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Gregor Müllegger, 14 years ago

Owner: changed from nobody to Gregor Müllegger

by Gregor Müllegger, 14 years ago

Attachment: issue14632.1.diff added

Skipping tests that depend on working User.objects.create(...)

comment:5 by Gregor Müllegger, 14 years ago

Has patch: set
Keywords: sprintnov13 added
Triage Stage: AcceptedReady 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 Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [14557]) Fixed #14632 -- Skip a messages test if auth app is not in INSTALLED_APPS. Thanks, gregmuellegger.

comment:7 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top