Useful additions to Django's default TestCase, such as shortcut assertions and improved request factory. Current version is 2.4.1, updated 2025-03, maintained by REVSYS. Release cadence is irregular, roughly 1-2 minor versions per year.
pip install django-test-plusVerified import paths — ran on the pinned version, not inferred.
Subclass `test_plus.TestCase` to get additional assertions like `assert_200`, `assert_contains`, `get_check_200`, and improved request factory.
Upgrade to Django >= 3.2 and Python >= 3.6. Ensure your URLs include trailing slashes where expected.
Use `django.test.TransactionTestCase` or `test_plus.TestCase` with `transaction=True`.
For views that redirect, use `self.client.get(url, follow=True)` or check redirect status explicitly with `assert_302` or `assert_redirects`.