Opened 5 years ago

Closed 5 years ago

#13985 closed (duplicate)

tests does not recognize non models.py apps

Reported by: Ciantic 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: UI/UX:

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 Changed 5 years ago by d0ugal

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

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