django/tests
2025-11-16 02:23:39 +02:00
..
absolute_url_overrides
admin_autodiscover
admin_changelist Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
admin_checks Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
admin_custom_urls Removed double spaces after periods and within phrases. 2025-07-23 10:09:43 -03:00
admin_default_site
admin_docs Refs #36005 -- Bumped minimum supported versions of docutils to 0.22. 2025-10-19 20:13:16 +02:00
admin_filters Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
admin_inlines Fixed #36601 -- Fixed color contrast of FilteredSelectMultiple widget chosen labels in TabularInlines. 2025-09-17 09:56:01 +02:00
admin_ordering Fixed #9602 -- Added AdminSite.get_model_admin(). 2023-07-07 08:06:01 +02:00
admin_registration Fixed #373 -- Added CompositePrimaryKey. 2024-11-29 11:23:04 +01:00
admin_scripts Refs #36680 -- Avoided manipulating PATH in AdminScriptTestCase. 2025-11-10 14:13:49 -05:00
admin_utils Fixed #21961 -- Added support for database-level delete options for ForeignKey. 2025-10-18 15:03:50 +02:00
admin_views Fixed #36717 -- Redirect authenticated users on admin login view to next URL. 2025-11-12 19:42:24 -03:00
admin_widgets Fixed #34624 -- Removed change, delete, and view buttons for non-Select widgets in RelatedFieldWidgetWrapper. 2025-08-29 08:38:12 +02:00
aggregation Fixed CVE-2025-59681 -- Protected QuerySet.annotate(), alias(), aggregate(), and extra() against SQL injection in column aliases on MySQL/MariaDB. 2025-10-01 08:11:45 -04:00
aggregation_regress Reverted "Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping." 2025-10-28 11:40:01 -04:00
annotations Fixed CVE-2025-59681 -- Protected QuerySet.annotate(), alias(), aggregate(), and extra() against SQL injection in column aliases on MySQL/MariaDB. 2025-10-01 08:11:45 -04:00
app_loading Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
apps Fixed #36369 -- Cleared additional cached properties in apps.clear_cache(). 2025-09-19 14:57:05 -04:00
asgi Fixed #36399 -- Added support for multiple Cookie headers in HTTP/2 for ASGIRequest. 2025-08-21 16:48:54 +02:00
async Refs #35530 -- Removed request.user or auser() fallback in auth.login and auth.alogin. 2025-09-17 15:17:05 -03:00
auth_tests Fixed #36709 -- Included static methods in system check for UserModel.is_anonymous/is_authenticated methods. 2025-11-05 16:56:15 -05:00
backends Refs #24928 -- Added introspection support for PostgreSQL HStoreField. 2025-11-14 13:36:15 +01:00
base
bash_completion Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
basic Refs #28586 - Copied fetch mode in QuerySet.create(). 2025-10-16 14:52:22 -04:00
builtin_server
bulk_create Fixed #36702 -- Made bulk_create() return pk values set by an expression. 2025-11-06 11:58:01 -05:00
cache Fixed #36560 -- Prevented UpdateCacheMiddleware from caching responses with Cache-Control 'no-cache' or 'no-store'. 2025-08-21 16:48:36 +02:00
check_framework Fixed #36663 -- Defaulted to running checks against all databases. 2025-11-13 11:37:58 +01:00
composite_pk Fixed #36704 -- Fixed system check error for proxy model with a composite pk. 2025-11-04 11:59:21 -05:00
conditional_processing
constraints Fixed #34871, #36518 -- Implemented unresolved lookups expression replacement. 2025-08-04 09:22:53 +02:00
contenttypes_tests Fixed #21961 -- Added support for database-level delete options for ForeignKey. 2025-10-18 15:03:50 +02:00
context_processors Fixed #15727 -- Added Content Security Policy (CSP) support. 2025-06-27 15:57:02 -03:00
csrf_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
custom_columns
custom_lookups Refs #35972 -- Returned params in a tuple in further lookups. 2025-10-29 07:38:20 -04:00
custom_managers Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
custom_methods
custom_migration_operations Fixed #35175 -- Made migraton writer preserve keyword-only arguments. 2024-02-09 09:37:13 +01:00
custom_pk Refs #10785 -- Added missing __hash__() method to custom pk test model. 2025-06-09 18:32:55 +02:00
datatypes Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
dates
datetimes
db_functions Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc. 2025-02-18 08:35:36 +01:00
db_typecasts
db_utils Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
dbshell Fixed #18392 -- Changed default mysql encoding to "utf8mb4". 2024-11-18 15:00:33 +01:00
decorators Fixed #36532 -- Added Content Security Policy view decorators to override or disable policies. 2025-08-28 17:23:48 -03:00
defer Fixed #28586 -- Added model field fetch modes. 2025-10-16 14:52:22 -04:00
defer_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
delete Fixed #21961 -- Added support for database-level delete options for ForeignKey. 2025-10-18 15:03:50 +02:00
delete_regress Fixed #35073 -- Avoided unnecessary calling of callables used by SET/SET_DEFAULT in Collector.collect(). 2024-02-08 18:41:32 +01:00
deprecation Added cleanup of cache clearing to DjangoFilePrefixesTests.setUp(). 2025-09-19 09:49:03 +02:00
dispatch Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
distinct_on_fields Fixed #36683 -- Added error message on QuerySet.update() following distinct(*fields). 2025-10-25 12:21:27 -04:00
empty
empty_models
expressions Fixed CVE-2025-59681 -- Protected QuerySet.annotate(), alias(), aggregate(), and extra() against SQL injection in column aliases on MySQL/MariaDB. 2025-10-01 08:11:45 -04:00
expressions_case
expressions_window Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
extra_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
field_deconstruction Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
field_defaults Fixed #27222 -- Refreshed model field values assigned expressions on save(). 2025-09-14 00:27:50 +02:00
field_subclassing
file_storage Fixed 36622 -- Prevented LazyObject FileField storages from evaluating at boot time. 2025-10-15 18:25:08 -03:00
file_uploads Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
files Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
filtered_relation Fixed #36442 -- Cloned FilteredRelation before rename_prefix_from_q. 2025-06-12 08:36:54 +02:00
fixtures Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
fixtures_model_package
fixtures_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
flatpages_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
force_insert_update Fixed #33579 -- Specialized exception raised on forced update failures. 2025-03-10 21:09:15 +01:00
foreign_object Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
forms_tests Fixed #36724 -- Removed invalid "for" attribute on <legend> tags. 2025-11-13 11:22:44 -05:00
from_db_value
generic_inline_admin Refs #34380 -- Changed the URLField default scheme to https and removed FORMS_URLFIELD_ASSUME_HTTPS per deprecation timeline. 2025-01-15 22:28:37 +01:00
generic_relations Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
generic_relations_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
generic_views Fixed #36488 -- Fixed merging of query strings in RedirectView. 2025-09-22 08:54:08 +02:00
get_earliest_or_latest Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
get_object_or_404
get_or_create Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
gis_tests Removed duplicate display_raw key in expected data in GeometryWidgetTests. 2025-10-20 14:52:02 -03:00
handlers Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
httpwrappers Fixed CVE-2025-64458 -- Mitigated potential DoS in HttpResponseRedirect/HttpResponsePermanentRedirect on Windows. 2025-11-05 09:20:57 -03:00
humanize_tests Fixed #36715 -- Handled non-finite Decimals in intcomma filter. 2025-11-10 14:45:48 -05:00
i18n Fixed #36543 -- Fixed time formats for fr_CA. 2025-09-23 16:52:47 +02:00
import_error_package
indexes Fixed #35469 -- Removed deferred SQL to create index removed by AlterField operation. 2024-05-28 12:44:07 +02:00
inline_formsets Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
inspectdb Fixed #36661 -- Added introspection of database-level delete options. 2025-10-31 14:33:27 +01:00
introspection Fixed #36661 -- Added introspection of database-level delete options. 2025-10-31 14:33:27 +01:00
invalid_models_tests Fixed #21961 -- Added support for database-level delete options for ForeignKey. 2025-10-18 15:03:50 +02:00
known_related_objects
logging_tests Refs CVE-2025-48432 -- Made SuspiciousOperation logging use log_response() for consistency. 2025-06-06 09:05:32 -03:00
lookup Fixed #36614 -- Deprecated QuerySet.values_list(flat=True) without a field. 2025-09-30 08:46:28 +02:00
m2m_and_m2o Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
m2m_intermediary Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
m2m_multiple
m2m_recursive
m2m_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
m2m_signals
m2m_through Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
m2m_through_regress Fixed #36177 -- Added a trailing newline to JSON serializer. (#19232) 2025-03-11 08:01:06 +01:00
m2o_recursive
mail Refs #35844 -- Doc'd Python 3.14 compatibility. 2025-10-17 19:25:02 +02:00
managers_regress
many_to_many Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
many_to_one Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
many_to_one_null Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
max_lengths
messages_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
middleware Fixed #36656 -- Avoided truncating async streaming responses in GZipMiddleware. 2025-10-21 10:45:12 -04:00
middleware_exceptions
migrate_signals Removed double spaces after periods and within phrases. 2025-07-23 10:09:43 -03:00
migration_test_data_persistence Fixed #35921 -- Fixed failure when running tests in parallel on postgres. 2024-11-27 12:51:41 +01:00
migrations Refs #31055 -- Augmented regression tests for database system checks. 2025-11-13 10:18:06 +01:00
migrations2 Fixed #35122 -- Made migrate --prune option respect --app_label. 2024-02-13 14:47:49 +01:00
model_enums Fixed #36005 -- Dropped support for Python 3.10 and 3.11. 2025-01-20 14:07:28 +01:00
model_fields Refs #35381 -- Made JSONNull deconstruct using convenient import path. 2025-11-12 17:14:52 -05:00
model_forms Fixed #36724 -- Removed invalid "for" attribute on <legend> tags. 2025-11-13 11:22:44 -05:00
model_formsets Fixed #36724 -- Removed invalid "for" attribute on <legend> tags. 2025-11-13 11:22:44 -05:00
model_formsets_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
model_indexes
model_inheritance Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
model_inheritance_regress Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
model_meta Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
model_options Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
model_package
model_regress
model_utils
modeladmin Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
multiple_database Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
mutually_referential
nested_foreign_keys Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
no_models
null_fk Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
null_fk_ordering Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
null_queries
one_to_one Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
or_lookups
order_with_respect_to Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
ordering Fixed #36407 -- Ensured default value is cast in Case expressions used in ORDER BY clause. 2025-06-05 09:52:56 +02:00
pagination Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
postgres_tests Refs #24928 -- Added introspection support for PostgreSQL HStoreField. 2025-11-14 13:36:15 +01:00
prefetch_related Refs #28586 -- Copied fetch modes to related objects. 2025-10-16 14:52:22 -04:00
project_template
properties
proxy_model_inheritance Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
proxy_models Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
queries Refs CVE-2025-64459 -- Avoided propagating invalid arguments to Q on dictionary expansion. 2025-11-05 09:20:57 -03:00
queryset_pickle Refs #28586 -- Made fetch modes pickle as singletons. 2025-10-16 14:52:22 -04:00
raw_query Fixed #28586 -- Added model field fetch modes. 2025-10-16 14:52:22 -04:00
redirects_tests
requests_tests Refs #36520 -- Ensured only the header value is passed to parse_header_parameters for multipart requests. 2025-08-28 14:25:36 -03:00
requirements Refs #36664 -- Added Python 3.15 to daily builds. 2025-10-22 15:36:10 +02:00
reserved_names
resolve_url
responses Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc. 2025-02-18 08:35:36 +01:00
reverse_lookup
save_delete_hooks Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
schema Fixed #21961 -- Added support for database-level delete options for ForeignKey. 2025-10-18 15:03:50 +02:00
select_for_update Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
select_related Fixed #36674 -- Fixed memory leak in select_related(). 2025-10-24 15:51:39 -04:00
select_related_onetoone Fixed #34612 -- Fixed QuerySet.only() crash on reverse relationships. 2023-06-01 19:50:47 +01:00
select_related_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
serializers Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
servers Fixed #36470 -- Prevented log injection in runserver when handling NOT FOUND. 2025-10-20 16:21:32 -03:00
sessions_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
settings_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
shell Refs #35680 -- Sorted shell default autoimports to prevent isort mismatches. 2025-07-18 08:47:44 -03:00
shortcuts Fixed #35784 -- Added support for preserving the HTTP request method in HttpResponseRedirectBase. 2024-11-14 15:53:49 -03:00
signals Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
signed_cookies_tests
signing Refs #33199 -- Removed support for passing positional arguments to Signer/TimestampSigner. 2023-09-18 22:12:40 +02:00
sitemaps_tests Americanized some spellings. 2025-04-16 10:21:38 +02:00
sites_framework
sites_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
sphinx Fixed #29942 -- Restored source file linking in docs by using the Sphinx linkcode ext. 2024-05-14 22:08:29 -03:00
staticfiles_tests Refs #22712 -- Removed all parameter from django.contrib.staticfiles.finders.find(). 2025-09-17 15:17:05 -03:00
str
string_lookup Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
swappable_models
syndication_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
tasks Refs #35859 -- Removed support for Task enqueuing on transaction commit. 2025-09-17 13:28:58 -03:00
template_backends Fixed #35837 -- Added missing alters_data=True to QuerySet and UserManager methods. 2024-11-01 11:43:49 +01:00
template_loader
template_tests Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source warning. 2025-09-04 12:14:10 -04:00
templates
test_client Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
test_client_regress Refs #36500 -- Corrected rewrapped long lines fixed via a script. 2025-07-23 20:17:55 -03:00
test_exceptions
test_runner Fixed #36678 -- Limited retries in ParallelTestRunner. 2025-10-29 09:11:31 -03:00
test_runner_apps Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
test_utils Merge 64420ea54f into 5c60763561 2025-11-16 02:23:39 +02:00
timezones Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
transaction_hooks
transactions Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
unmanaged_models Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
update Fixed #35453 -- Made ManyToManyField.concrete False. 2025-09-22 09:52:22 -04:00
update_only_fields Fixed #27222 -- Refreshed model field values assigned expressions on save(). 2025-09-14 00:27:50 +02:00
urlpatterns Fixed #35518 -- Optimized RoutePattern by using string operations for converter-less routes. 2025-05-13 12:05:58 +01:00
urlpatterns_reverse Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
user_commands Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
utils_tests Fixed #36710 -- Fixed a regression in urlize for multipart domain names. 2025-11-05 17:05:54 -05:00
validation Fixed #35638 -- Updated validate_constraints to consider db_default. 2024-08-05 17:33:12 +02:00
validators Fixed #36098 -- Fixed validate_ipv6_address()/validate_ipv46_address() crash for non-string values. 2025-01-15 13:46:06 -03:00
version
view_tests Refs #28526 -- Provided URLResolver namespace in technical 404 template. 2025-09-26 14:06:39 +02:00
wsgi Fixed #36467 -- Removed leading whitespaces from Set-Cookie header values in WSGIHandler. 2025-06-18 11:25:14 +02:00
xor_lookups Fixed #34604 -- Corrected fallback SQL for n-ary logical XOR. 2023-06-08 20:41:18 +02:00
.coveragerc Fixed #34810 -- Measured test coverage on django-admin commands. 2023-09-07 15:47:26 -03:00
README.rst
runtests.py Refs #35844 -- Checked for forkserver mode when running runtests.py with --selenium and --parallel. 2025-11-11 18:28:07 -05:00
sitecustomize.py Fixed #34810 -- Measured test coverage on django-admin commands. 2023-09-07 15:47:26 -03:00
test_sqlite.py Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
urls.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ python -m pip install -e ..
    $ python -m pip install -r requirements/py3.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.