Two important 3rd party testing tools for Django are Mock and Mommy. Both allow you to quickly create instances of Django models for testing. The advantage of Mock is it is fast because it does not require a test database to be setup. It is used primarily for unit testing.
Here is a skeleton of a mock test:
import unittest import mock from models import MyModel class TestMyCode(unittest.TestCase): def test_1(self): instance = mock.Mock(spec=MyModel) # Do something with instance
Put this in your tests.py file for the app. Then run using:
python manage.py test my_app.TestMyCode