Opened 8 years ago

Closed 8 years ago

#3710 closed (duplicate)

django won't test a views-only app

Reported by: yary h <not.com@…> Owned by: jacob
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

My project includes an app which has views and tests, but no models. The django test runner used to run its tests just fine, but something changed during the last few weeks (don't know when, I haven't run tests on my app much lately.)

Now when I test my project, it skips the views-only app ("qnr"), and if I try an explicit [manage.py --verbosity=2 test qnr?] django complains:[[[

File "C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django\db\models\loading.py", line 47, in get_app

raise ImproperlyConfigured, "App with label %s could not be found" % app_label

django.core.exceptions.ImproperlyConfigured: App with label qnr could not be found
]]]

Digging into django/db/models/loading.py shows that it IS finding the app, but it has no models... and I can't just set it to true, because the callers are expecting a reference to the app's models. I'm going to have to create a dummy models.py to make the tests go as a temporary workaround, please think about a fix in the meantime...

Change History (4)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3310.

comment:2 Changed 8 years ago by anonymous

buit this is not closed, I'm experiencing the same failure with svn HEAD as of March,5 2007.

I think the bug closed on 3310 was reintroduced.

comment:3 Changed 8 years ago by anonymous

  • Resolution duplicate deleted
  • Status changed from closed to reopened

comment:4 Changed 8 years ago by mtredinnick

  • Resolution set to duplicate
  • Status changed from reopened to closed

This was closed as a duplicate of #3310, meaning that it is the same bug. Note that #3310 is not closed, meaning we have not yet fixed the bug.

Please do not reopen this.

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