Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18877 closed Uncategorized (invalid)

Selecting app for testing - dot in app name

Reported by: rrafal@… Owned by: nobody
Component: Testing framework Version: 1.4
Severity: Normal 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

I'm trying to execute the following command:
python manage.py test django.contrib.auth

I'm getting this message:
App with label django could not be found

When searching the tests, django assumes that the app has no dot "." in the name. I believe the assumption is too strict and unnecessary. I'm using django 1.4.1

I run into this problem because my own apps include dot in the name.

Change History (2)

comment:1 by Russell Keith-Magee, 12 years ago

Resolution: invalid
Status: newclosed

From Django's point of view, the app isn't called "django.contrib.auth"; it's called "auth" -- only the last part of the dotted name is used. If you want to run the test suite for auth, you should use

./manage.py test auth

This is something that is quite deep ingrained in the application loading infrastructure, so it isn't really plausible to change it.

comment:2 by anonymous, 12 years ago

I was not aware that apps were give shorter names like that. Thank you for the explanation. Everything works again!

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