django/tests
Tim Graham 1285de557b
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 incorrect IDs in test_in_bulk_preserve_ordering.
2025-08-27 18:23:42 -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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 #35892 -- Supported Widget.use_fieldset in admin forms. 2025-08-19 16:35:56 +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 Refs #36210 -- Added missing limits in Subquery tests. 2025-08-07 14:28:44 +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 Fixed #27489 -- Renamed permissions upon model renaming in migrations. 2025-08-19 16:36:52 +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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
builtin_server Fixed #33865 -- Optimized LimitedStream wrapper. 2023-01-05 19:26:56 +01:00
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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
composite_pk Refs #36430, #36416, #34378 -- Simplified batch size calculation in QuerySet.in_bulk(). 2025-08-21 16:47:41 +02: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 Refs #32365 -- Removed support for pytz timezones per deprecation timeline. 2023-01-17 11:49:15 +01:00
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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -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 Fixed #36477, Refs #36163 -- Added @deprecate_posargs decorator to simplify deprecation of positional arguments. 2025-07-16 08:49:03 -03: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 #36210, Refs #36181 -- Allowed Subquery usage in further lookups against composite pks. 2025-08-07 14:28:44 +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 Added supports_expression_defaults check in DefaultTests.test_full_clean() test. 2025-04-06 09:40:12 +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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 #36382 -- Confirmed support for GDAL 3.11. 2025-08-21 16:46:41 +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 Refs #36500 -- Shortened some long docstrings and comments. 2025-07-23 20:17:55 -03: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 Fixed #34227 -- Fixed QuerySet.select_related() with multi-level FilteredRelation. 2023-01-24 10:20:27 +01:00
logging_tests Refs CVE-2025-48432 -- Made SuspiciousOperation logging use log_response() for consistency. 2025-06-06 09:05:32 -03:00
lookup Fixed incorrect IDs in test_in_bulk_preserve_ordering. 2025-08-27 18:23:42 -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 #15727 -- Captured failed request log in CSPMiddlewareTest. 2025-08-26 17:26:01 -04:00
middleware_exceptions Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
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 #35972 -- Fixed lookup crashes after subquery annotations. 2025-08-04 10:14:01 +02: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 Removed double spaces after periods and within phrases. 2025-07-23 10:09:43 -03: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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
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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
prefetch_related Refs #36282 -- Fixed PrefetchRelatedMTICacheTests test ordering expectations. 2025-08-05 10:13:00 +02: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 Fixed #34871, #36518 -- Implemented unresolved lookups expression replacement. 2025-08-04 09:22:53 +02: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 #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03: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 Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
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 Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
syndication_tests Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -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 Fixed #36410 -- Added support for Template Partials to the Django Template Language. 2025-08-14 21:53:14 -03: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 #36531 -- Added forkserver support to parallel test runner. 2025-07-29 14:11:22 -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 Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors following Python's HTMLParser fixed parsing. 2025-08-12 23:04:09 -03: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 Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
update_only_fields Fixed #33579 -- Specialized exception raised on forced update failures. 2025-03-10 21:09:15 +01: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 #36572 -- Revert "Fixed #36546 -- Deprecated django.utils.crypto.constant_time_compare() in favor of hmac.compare_digest()." 2025-08-27 10:50:50 +02: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 Removed double spaces after periods and within phrases. 2025-07-23 10:09:43 -03: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/.