about

split Django unit tests into files - 10 Sep 2013

search

motivation

I like having unit tests grouped into separate files as any self-respecting unit test framework typically allows. Kind of a shock that django didn't get things right out of the box. The start of my research landed me on split django app tests in several files.

create/update files

usage

In the taskifier example, I can call all the tests by python manage.py test taskifier, a specific test case python manage.py test taskifier.WorkerHelperTestCase, or even a specific test method python manage.py test taskifier.WorkerHelperTestCase.test_email_simple_validate.


156 words. Post tags: python, Django, and unit test.

Post content is written by Jason Zerbe and licensed CC BY-NC 3.0.