- Create a directory in the app called
tests - Create an
__init__.pyfile in that directory with the contents of this gist - Create individual test files in the directory, e.g.
some_kind_of_test.py,some_other_kind_of_test.py - Run as normal, e.g.
./manage.py test myappor./manage.py test myapp.SomeSpecificTest
http://stackoverflow.com/questions/6248510/how-to-spread-django-unit-tests-over-multiple-files
For Django > 1.6 tests can be in a tests directory with an empty
__init__.pyfile. They just need to be namedtest_<something>.