1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests
Adam Johnson 9582745257 Fixed #35622 -- Made unittest ignore Django assertions in traceback frames.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-08-08 21:34:01 -03:00
..
absolute_url_overrides
admin_autodiscover
admin_changelist Fixed #35606, Refs #34045 -- Fixed rendering of ModelAdmin.action_checkbox for models with a __html__ method. 2024-07-18 08:09:37 +02:00
admin_checks Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display. 2024-02-05 21:42:04 -03:00
admin_custom_urls
admin_default_site
admin_docs Fixed #35179 -- Made admindocs detect positional/keyword-only arguments. 2024-02-14 13:17:40 +01:00
admin_filters Fixed #35198 -- Fixed facet filters crash on querysets with no primary key. 2024-02-29 10:01:18 +01:00
admin_inlines Refs #35464 -- Added test to cover layout of TabularInline fieldsets. 2024-07-15 12:43:42 +02:00
admin_ordering
admin_registration
admin_scripts Fixed typos in test docstrings. 2024-05-16 07:57:58 +02:00
admin_utils Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display. 2024-02-05 21:42:04 -03:00
admin_views Fixed #35639 -- Improved admin's delete confirmation page title. 2024-08-07 18:10:49 -03:00
admin_widgets Fixed CVE-2024-41991 -- Prevented potential ReDoS in django.utils.html.urlize() and AdminURLFieldWidget. 2024-08-06 08:50:08 +02:00
aggregation Fixed #35643 -- Fixed a crash when ordering a QuerySet by a reference containing "__". 2024-08-02 16:21:12 -03:00
aggregation_regress Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
annotations Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00
app_loading Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
apps
asgi Refs #35059 -- Used asyncio.Event in ASGITest.test_asyncio_cancel_error to enforce specific interleaving. 2024-05-28 14:36:34 -03:00
async Fixed #28344 -- Allowed customizing queryset in Model.refresh_from_db()/arefresh_from_db(). 2024-01-15 10:55:14 +01:00
auth_tests Added test for acheck_password() to ensure make_password is called for unusable passwords. 2024-08-08 12:53:36 -03:00
backends Fixed #35469 -- Removed deferred SQL to create index removed by AlterField operation. 2024-05-28 12:44:07 +02:00
base
bash_completion Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
basic Fixed 35561 -- Made *args and **kwargs parsing more strict in Model.save()/asave(). 2024-06-26 12:13:17 -03:00
builtin_server
bulk_create
cache Fixed #34901 -- Added async-compatible interface to session engines. 2024-03-13 17:55:15 +01:00
check_framework Fixed #35233 -- Moved template engine system checks to backend methods. 2024-03-27 08:14:54 +01:00
conditional_processing
constraints Fixed #35638 -- Updated validate_constraints to consider db_default. 2024-08-05 17:33:12 +02:00
contenttypes_tests Fixed #35545, Refs #32833 -- Fixed ContentTypeManager.get_for_models() crash in CreateModel migrations. 2024-06-24 10:20:11 +02:00
context_processors Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
csrf_tests Fixed 35467 -- Replaced urlparse with urlsplit where appropriate. 2024-05-29 10:48:27 -03:00
custom_columns
custom_lookups Fixed #35413 -- Made unsupported lookup error message more specific. 2024-07-09 09:15:38 +02:00
custom_managers
custom_methods
custom_migration_operations Fixed #35175 -- Made migraton writer preserve keyword-only arguments. 2024-02-09 09:37:13 +01:00
custom_pk
datatypes
dates
datetimes
db_functions Fixed #33037 -- Fixed Trunc() with offset timezones on MySQL, SQLite, Oracle. 2024-02-15 10:02:57 +01:00
db_typecasts
db_utils Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
dbshell Simplified using DATABASES["OPTIONS"]. 2024-02-23 07:49:43 +01:00
decorators
defer Fixed #35044 -- Avoided clearing reverse relations and private fields when accessing deferred fields. 2024-03-08 11:09:54 +01:00
defer_regress Fixed #35356 -- Deferred self-referential foreign key fields adequately. 2024-04-23 13:17:17 -03:00
delete
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 #25466 -- Removed unused DeprecationInstanceCheck. 2024-07-11 09:40:07 +02:00
dispatch Refs #34986 -- Moved garbage_collect() helper to django.test.utils. 2023-12-06 09:26:11 +01:00
distinct_on_fields Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
empty
empty_models
expressions Fixed CVE-2024-42005 -- Mitigated QuerySet.values() SQL injection attacks against JSON fields. 2024-08-06 08:50:08 +02:00
expressions_case
expressions_window Fixed #35064 -- Fixed Window(order_by) crash with DecimalFields on SQLite. 2023-12-29 09:07:31 +01:00
extra_regress
field_deconstruction
field_defaults Fixed #35223 -- Made Model.full_clean() ignore fields with db_default when validating empty values. 2024-03-08 05:55:25 +01:00
field_subclassing
file_storage Fixed #35657 -- Made FileField handle db_default values. 2024-08-05 16:36:49 -03:00
file_uploads Fixed CVE-2024-39330 -- Added extra file name validation in Storage's save method. 2024-07-09 09:21:19 -03:00
files Fixed #35323 -- Prevented file_move_safe() from trying to overwrite existing file when allow_overwrite is False. 2024-03-24 16:05:36 +01:00
filtered_relation Fixed #35135 -- Made FilteredRelation raise ValueError on querysets as rhs. 2024-01-29 20:29:49 +01:00
fixtures Fixed #35159 -- Fixed dumpdata crash when base querysets use prefetch_related(). 2024-01-31 16:10:05 +01:00
fixtures_model_package
fixtures_regress
flatpages_tests
force_insert_update Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
foreign_object Refs #373 -- Added tuple lookups. 2024-08-01 17:26:09 +02:00
forms_tests Fixed #35601 -- Added TelInput widget. 2024-08-02 11:31:54 +02:00
from_db_value
generic_inline_admin
generic_relations
generic_relations_regress
generic_views Corrected cache_page()'s timeout value in tests.generic_views.urls. 2024-02-05 13:27:51 +01:00
get_earliest_or_latest
get_object_or_404
get_or_create Removed obsolete test_get_or_create_raises_IntegrityError_plus_traceback() test. 2024-02-21 11:50:22 +01:00
gis_tests Refs #35074 -- Avoided failed attempts to remove spatial indexes on nullable fields on MySQL. 2024-06-20 11:44:44 +02:00
handlers Fixed #35354 -- Simplified ASGIRequest path handling. 2024-04-05 11:35:38 +02:00
httpwrappers Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
humanize_tests Fixed #35443 -- Changed ordinal to return negative numbers unchanged. 2024-05-27 10:54:25 +02:00
i18n Fixed i18n.tests.TranslationTests.test_plural to use correct French translation. 2024-08-07 10:10:28 -03: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
inspectdb
introspection Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition. 2024-03-01 07:15:32 +01:00
invalid_models_tests Fixed #35580 -- Allowed related fields referencing auto-created through models. 2024-07-09 13:50:12 +02:00
known_related_objects
logging_tests Fixed #35537 -- Changed EmailMessage.attachments and EmailMultiAlternatives.alternatives to use namedtuples. 2024-06-20 09:43:40 +02:00
lookup Fixed #35413 -- Made unsupported lookup error message more specific. 2024-07-09 09:15:38 +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
m2m_signals
m2m_through
m2m_through_regress
m2o_recursive
mail Refs #35537 -- Improved documentation and test coverage for email attachments and alternatives. 2024-08-05 09:21:44 +02:00
managers_regress
many_to_many Fixed #29725 -- Removed unnecessary join in QuerySet.count() and exists() on a many to many relation. 2024-02-16 08:57:16 +01:00
many_to_one Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
many_to_one_null
max_lengths
messages_tests Fixed #35622 -- Made unittest ignore Django assertions in traceback frames. 2024-08-08 21:34:01 -03:00
middleware Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
middleware_exceptions
migrate_signals
migration_test_data_persistence
migrations Reverted "Fixed #28646 -- Prevented duplicate index when unique is set to True on PostgreSQL." 2024-08-01 09:25:33 +02:00
migrations2 Fixed #35122 -- Made migrate --prune option respect --app_label. 2024-02-13 14:47:49 +01:00
model_enums Refs #34986 -- Removed redundant CustomChoicesTests.test_timezone_unsupported(). 2023-11-29 21:12:53 +01:00
model_fields Refs #35560 -- Corrected required feature flags in GeneratedModelUniqueConstraint. 2024-07-15 10:20:09 +02:00
model_forms Cleaned up temporary test directories in tests. 2024-07-22 08:51:01 +02:00
model_formsets Fixed #35488 -- Fixed BaseModelFormSet.validate_unique() crash due to unhashable type. 2024-06-13 16:21:53 +02:00
model_formsets_regress
model_indexes
model_inheritance Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
model_inheritance_regress Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
model_meta Fixed #35407 -- Cached model's Options.swapped. 2024-05-07 14:25:51 +02:00
model_options
model_package
model_regress
model_utils
modeladmin Fixed #35628 -- Allowed compatible GeneratedFields for ModelAdmin.date_hierarchy. 2024-08-05 15:27:20 +02:00
multiple_database Fixed #16281 -- Fixed ContentType.get_object_for_this_type() in a multiple database setup. 2024-02-05 08:25:23 +01:00
mutually_referential
nested_foreign_keys
no_models
null_fk
null_fk_ordering Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
null_queries
one_to_one Fixed #35230 -- Added cached ForeignObjectRel.accessor_name. 2024-02-19 05:47:12 +01:00
or_lookups
order_with_respect_to Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
ordering
pagination
postgres_tests Fixed #35638 -- Updated validate_constraints to consider db_default. 2024-08-05 17:33:12 +02:00
prefetch_related Fixed #35309 -- Made prefetch clear ordering for single-valued relationships. 2024-03-20 05:26:18 +01:00
project_template
properties
proxy_model_inheritance
proxy_models Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
queries Fixed #35559 -- Avoided unnecessary query on sliced union of empty queries. 2024-07-19 08:54:47 +02:00
queryset_pickle
raw_query Fixed typos in docstrings and docs. 2024-03-07 06:01:01 +01:00
redirects_tests
requests_tests Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
requirements Updated asgiref dependency for 5.1 release series. 2024-07-24 08:21:07 +02:00
reserved_names
resolve_url
responses
reverse_lookup
save_delete_hooks Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
schema Reverted "Fixed #28646 -- Prevented duplicate index when unique is set to True on PostgreSQL." 2024-08-01 09:25:33 +02:00
select_for_update
select_related
select_related_onetoone
select_related_regress
serializers Refs #21286 -- Removed invalid commented out models and tests from serializer tests. 2024-03-04 11:38:18 +01:00
servers Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
sessions_tests Fixed #34901 -- Added async-compatible interface to session engines. 2024-03-13 17:55:15 +01:00
settings_tests Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
shell Fixed #35517, Refs #35515 -- Improved test coverage of shell command. 2024-06-27 16:42:55 +02:00
shortcuts
signals Fixed #35174 -- Fixed Signal.asend()/asend_robust() crash when all receivers are asynchronous. 2024-02-08 11:36:28 +01:00
signed_cookies_tests
signing
sitemaps_tests
sites_framework
sites_tests Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01: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 #35553 -- Handled import*as in HashedFilesMixin. 2024-08-07 11:01:56 +02:00
str
string_lookup
swappable_models
syndication_tests Fixed #12978 -- Added support for RSS feed stylesheets. 2024-06-18 17:25:43 +02:00
template_backends
template_loader
template_tests Fixed #35661 -- Fixed test_too_many_digits_to_rander() test crash on PyPy. 2024-08-08 09:53:04 +02:00
templates
test_client Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
test_client_regress Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
test_exceptions
test_runner Refs #32114 -- Fixed RemoteTestResultTest.test_unpicklable_subtest test without tblib. 2024-02-22 06:27:39 +01:00
test_runner_apps
test_utils Fixed #35622 -- Made unittest ignore Django assertions in traceback frames. 2024-08-08 21:34:01 -03:00
timezones
transaction_hooks
transactions Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
unmanaged_models
update
update_only_fields Fixed #35554, Refs #35060 -- Corrected deprecated *args parsing in Model.save()/asave(). 2024-06-25 13:12:10 -03:00
urlpatterns Fixed #35252 -- Optimized _route_to_regex(). 2024-03-05 13:09:10 +01:00
urlpatterns_reverse Refs #9847 -- Added tests for handler403 resolution. 2024-03-04 05:24:36 +01:00
user_commands
utils_tests Fixed CVE-2024-41991 -- Prevented potential ReDoS in django.utils.html.urlize() and AdminURLFieldWidget. 2024-08-06 08:50:08 +02:00
validation Fixed #35638 -- Updated validate_constraints to consider db_default. 2024-08-05 17:33:12 +02:00
validators Fixed #18119 -- Added a DomainNameValidator validator. 2024-05-21 23:11:12 +02:00
version
view_tests Fixed #35646 -- Extended SafeExceptionReporterFilter.hidden_settings to treat AUTH as a sensitive match. 2024-08-01 15:02:00 -03:00
wsgi Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
xor_lookups
.coveragerc
README.rst
runtests.py Advanced deprecation warnings for Django 5.2. 2024-05-22 15:44:07 -03:00
sitecustomize.py
test_sqlite.py
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/.