We use a custom authentication backend, and I'm trying to develop a
test suite for it.  The app has no model, since it uses the model from
contrib.auth  So, I put my tests in tests.py, but the test runner does
not load it, even though the custom auth app is in INSTALLED_APPS.  I
tried adding an empty models.py file to the folder, but that seemed to
cause some major issues during syncdb (trying to create duplicate
tables)

When I move test.py to another app (with a models.py), it runs fine,
but doesn't run at all when I move it back into the custom auth app
(with no model).

>From the Django documentation:
For a given Django application, the test runner looks for doctests in
two places:
    * The models.py file. ...
    * A file called tests.py in the application directory -- i.e., the
directory that holds models.py. ...
...
$ ./manage.py test
By default, this will run every test in every application in
INSTALLED_APPS.

The first bit of documentation seems to indicate that the test runner
will only look in directories that contain a models.py (why?).  The
second bit seems more sensible, but does not appear to be true.

Any advice on how to get the test runner to run my tests or where to
put the tests (sensibly) so they run?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to