- Put these files in
yourapp/testing/ - Install:
- django-nose: https://django-nose.readthedocs.org/en/latest/installation.html
- model_mommy:
pip install model-mommy
- Run tests with
python manage.py test, or test specific files or directories withpython manage.py test myapp/tests/test_models.py
- Test cases which use the database must subclass
MyAppTestCase, but other test can use test functions, generators, and everything else supported by nose: https://nose.readthedocs.org/en/latest/writing_tests.html