Opened 14 years ago

Closed 14 years ago

#13985 closed (duplicate)

tests does not recognize non models.py apps

Reported by: Jari Pennanen Owned by: nobody
Component: Testing framework Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

  1. Create Django app e.g. yourapp without models.py
  2. Create tests.py inside your app.
  3. Try to test this app using manage.py test yourapp

It throws an error, why? I have many Django apps I prefer to test and they don't have a single model in them and never need to.

Currently workaround is to create empty models.py to your app, though it is not very clean. Someone hasty might think that app has models, when in fact it is just templatetag library app or something like that with empty models.py.

Change History (1)

comment:1 by Dougal Matthews, 14 years ago

Resolution: duplicate
Status: newclosed

This is a duplicate of #7198 that covers the more general problem and in detail.

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