django/tests
Adam Zapletal 606fc35279
Some checks are pending
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Fixed #36083 -- Ran system checks in ParallelTestSuite workers.
Workers created by ParallelTestSuite were not running system
checks in the spawn multiprocessing mode. In general this is
fine, but system checks can have side effects expected by tests.

This patch runs system checks inside of _init_worker, which is
only called by ParallelTestSuite.
2025-09-16 21:57:22 -04: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 Captured stderr during admin_docs test. 2025-01-27 09:23:56 +01: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 #36556 -- Fixed TabularInline width overflowing the page. 2025-08-26 13:45:28 +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 Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
admin_utils Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
admin_views Refs #36366 -- Fixed page number layout in admin pagination on small screens. 2025-08-21 17:04:28 +02: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
aggregation_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
annotations Fixed CVE-2025-57833 -- Protected FilteredRelation against SQL injection in column aliases. 2025-09-03 13:10:58 +02:00
app_loading Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
apps Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 -- Corrected deprecation message in auth.alogin(). 2025-08-22 16:14:09 +02:00
auth_tests Refs #27489 -- Made RenamePermission() operation respect database. 2025-09-15 21:17:18 +02:00
backends Fixed #36430 -- Removed artificially low limit on single field bulk operations on SQLite. 2025-08-21 16:47:41 +02:00
base
bash_completion Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
basic Fixed #27222 -- Refreshed model field values assigned expressions on save(). 2025-09-14 00:27:50 +02:00
builtin_server
bulk_create Fixed failing bulk_create test raising IntegrityError when run in reverse. 2025-08-21 12:25:57 -03: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 #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
composite_pk Fixed #36481 -- Fixed QuerySet.update concrete fields check. 2025-09-04 12:15:45 -04:00
conditional_processing
constraints Fixed #34871, #36518 -- Implemented unresolved lookups expression replacement. 2025-08-04 09:22:53 +02:00
contenttypes_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Fixed #35972 -- Fixed lookup crashes after subquery annotations. 2025-08-04 10:14:01 +02: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
defer_regress Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
delete Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Refs #35667 -- Cached Django file prefixes for warnings. 2025-09-12 10:35:01 +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 Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
empty
empty_models
expressions Fixed #27222 -- Refreshed model field values assigned expressions on save(). 2025-09-14 00:27:50 +02: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -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 Fixed #36580 -- Fixed constraint validation crash when condition uses a ForeignObject. 2025-09-16 10:25:16 -04:00
forms_tests Fixed #35892 -- Supported Widget.use_fieldset in admin forms. 2025-08-19 16:35:56 +02: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Fixed OGRInspectTest.test_time_field with memory Spatialite database. 2025-09-16 08:10:31 +02:00
handlers Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
httpwrappers Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
humanize_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
i18n Fixed #36368 -- Prevented duplicate locale paths and write_po_file calls in makemessages. 2025-08-12 09:47:16 +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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
introspection Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04:00
invalid_models_tests Fixed #36530 -- Extended fields.E347 to check for ManyToManyField involving CompositePrimaryKey on either side. 2025-08-05 08:34:40 -03: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 Refs #36606 -- Added tests for QuerySet.values_list(flat=True) without fields. 2025-09-16 20:58:40 -04: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 Fixed #35581 -- Updated django.core.mail to Python's modern email API. 2025-07-25 13:50:02 +02:00
managers_regress
many_to_many Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
many_to_one Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Refs #34989 -- Ensured the Content-Length header is set when redirect with APPEND_SLASH. 2025-09-03 22:49:34 +02: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 Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04: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 #27222 -- Refreshed GeneratedFields values on save() initiated update. 2025-09-14 00:27:49 +02:00
model_forms Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
model_formsets Fixed #36251 -- Avoided mutating form Meta.fields in BaseInlineFormSet. 2025-08-25 10:05:45 +02: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Fixed #28041 -- Added Lexeme expression to contrib.postgres.search. 2025-09-16 15:09:11 -04:00
prefetch_related Fixed #36426 -- Added support for further iterables in prefetch_related_objects(). 2025-09-16 14:14:23 -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 #27222 -- Deduplicated db_returning fields in Model.save(). 2025-09-16 12:54:10 -04:00
queryset_pickle Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
raw_query Fixed typos in docstrings and docs. 2024-03-07 06:01:01 +01: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 #35844 -- Readded optional requirements on daily builds for Python 3.14. 2025-08-01 09:43:22 +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 #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField. 2025-09-05 10:43:10 -04: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
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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -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 Fixed #36525 -- Silenced individual deleted file messages in collectstatic --clear's default verbosity. 2025-08-08 09:52:16 +02: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 Fixed #35859 -- Added background Tasks framework interface. 2025-09-16 17:28:32 -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 #36083 -- Ran system checks in ParallelTestSuite workers. 2025-09-16 21:57:22 -04: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 Fixed #36589 -- Made assertTemplateUsed/NotUsed track full path for PartialTemplate. 2025-09-15 16:45:13 -04: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 #36481 -- Fixed QuerySet.update concrete fields check. 2025-09-04 12:15:45 -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 #35859 -- Added background Tasks framework interface. 2025-09-16 17:28:32 -03: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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/.