django-test-plus
django-test-plus provides useful additions to Django's default TestCase
What it is and what it does
django-test-plus is a TestCase subclass for Django that bundles common testing patterns into helper methods, cutting down on repetitive test code. Instead of manually reversing URLs, checking response status codes, and inspecting context dictionaries, you call methods like `get()`, `response_200()`, and `assertInContext()`. It also provides utilities for user creation, login context managers, query count assertions, and a pytest fixture that exposes the same helpers for pytest-style tests.
The package is designed for teams writing Django tests who want to move faster. It works with Django 4.2 LTS, 5.1, 5.2 LTS, 6.0, and 6.1, and Python 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15, including free-threaded builds. No external runtime dependencies means installation is straightforward and the package integrates directly into your existing Django test suite.
Use it for:
- Speed up view testing by chaining GET/POST calls with status assertions in one line
- Test authentication flows with login context managers and assertLoginRequired helpers
- Create test users quickly instead of manually instantiating and saving User objects
- Assert query counts to catch N+1 problems early with query count assertion methods
- Use pytest fixtures to access the same helpers in pytest-style tests alongside Django's test framework
- Build project-specific test base classes by subclassing and adding custom helpers
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a TestCase subclass for Django with helper methods to reduce boilerplate when writing tests for views, models, and authentication, including shortcuts for URL reversal, status code assertions, and user creation.
Yes. django-test-plus is actively maintained, has no dependencies, and is widely used. It directly reduces test boilerplate for any Django project using the standard test framework or pytest, with no compatibility risk and permissive licensing. Install it if your team writes Django tests.
Install
django-test-plus on PyPI
pip
pip install django-test-plusuv
uv add django-test-pluspoetry
poetry add django-test-plusInstalling django-test-plus
Before you install
Low friction install with no runtime dependencies. Actively maintained with a recent release and steady repository activity; supports current Python versions and modern Django versions.
License in practice
Licensed under BSD (permissive), so you can use, modify, and distribute the package freely in commercial and open-source projects without restriction.
Quickstart
pip install django-test-plus
from test_plus.test import TestCase
class MyViewTests(TestCase):
def test_view(self):
self.get('my-url-name')
self.response_200()
self.assertInContext('some-key')
Verify before relying
- Exact monthly download volume and ranking position to confirm popularity tier claims
- Whether the package is compatible with Django 5.0 (classifiers list 5.0 but description does not)
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 135,801/month — #11,417 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_test_plus-2.6.2-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
django-upgradeAutomatically modernizes Django project code by…
permissive · top 15,000 on PyPI
django-dirtyfieldsTracks which fields on a Django model instance…
permissive · top 15,000 on PyPI
django-extra-viewsProvides additional class-based views for…
permissive · top 15,000 on PyPI
testtoolstesttools extends Python's standard unittest…
permissive · top 5,000 on PyPI
pytest-djangopytest-django integrates Django with pytest,…
permissive · top 1,000 on PyPI
model-bakeryModel Bakery creates test fixtures for Django…
permissive · top 5,000 on PyPI
django-htmxProvides Django integration utilities for htmx,…
permissive · top 5,000 on PyPI
django-bracesProvides reusable mixin classes for Django…
permissive · top 15,000 on PyPI
django-stubsProvides type stubs and a mypy plugin to enable…
permissive · top 5,000 on PyPI
behave-djangoIntegrates Behave BDD testing into Django…
permissive · top 15,000 on PyPI