1
0
mirror of https://github.com/django/django.git synced 2025-01-12 19:37:06 +00:00
django/tests
Nick Pope f92e68c30a Fixed -- Added support for serializing functions decorated with functools.lru_cache in migrations.
`@functools.cache` and `@functools.lru_cache` return an object of type
`functools._lru_cache_wrapper` which prevented the migrations serializer from
working. Simply using the existing `FunctionTypeSerializer` for this additional
type works as expected.
2023-09-13 15:57:18 -03:00
..
absolute_url_overrides
admin_autodiscover
admin_changelist Fixed -- Updated selection counter in admin changelist on Chrome. 2023-07-10 10:09:07 +02:00
admin_checks Fixed -- Added AdminSite.get_model_admin(). 2023-07-07 08:06:01 +02:00
admin_custom_urls
admin_default_site
admin_docs Fixed typo in tests/admin_docs/models.py. 2023-07-03 10:47:41 +02:00
admin_filters
admin_inlines Fixed -- Established relationship between form fields and their help text. 2023-07-06 08:03:19 +02:00
admin_ordering Fixed -- Added AdminSite.get_model_admin(). 2023-07-07 08:06:01 +02:00
admin_registration Refs -- Moved AlreadyRegistered/NotRegistered exceptions to django.contrib.admin.exceptions. 2023-07-07 13:22:06 +02:00
admin_scripts Fixed -- Avoided importing modules in startapp/startproject. 2023-09-01 13:24:05 +02:00
admin_utils Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
admin_views Refs -- Moved AlreadyRegistered/NotRegistered exceptions to django.contrib.admin.exceptions. 2023-07-07 13:22:06 +02:00
admin_widgets Fixed date_time_picker_shortcuts() tests on Windows. 2023-06-14 08:01:14 +02:00
aggregation Fixed -- Fixed QuerySet.count() when grouping by unused multi-valued annotations. 2023-08-01 16:16:28 +02:00
aggregation_regress
annotations
app_loading
apps Fixed -- Raised RuntimeWarning when performing import-time queries. 2023-08-21 13:44:25 +02:00
asgi Fixed -- Fixed handling ASGI http.disconnect for streaming responses. 2023-09-11 19:53:21 +02:00
async Fixed -- Added QuerySet.aiterator() support for prefetch_related(). 2023-07-31 21:17:36 +02:00
auth_tests Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
backends Fixed -- Deprecated DatabaseOperations.field_cast_sql(). 2023-08-31 06:18:07 +02:00
base
bash_completion
basic
builtin_server
bulk_create Fixed -- Made QuerySet.bulk_create() retrieve primary keys when updating conflicts. 2023-07-10 13:17:28 +02:00
cache
check_framework Fixed -- Added system check for unmatched angle brackets in path(). 2023-07-11 11:59:27 +02:00
conditional_processing
constraints Fixed -- Fixed Meta.constraints validation crash when using pk. 2023-08-11 08:51:29 +02:00
contenttypes_tests
context_processors
csrf_tests Corrected logger in CsrfViewMiddlewareTestMixin.test_ensures_csrf_cookie_no_logging(). 2023-09-13 13:49:01 +02:00
custom_columns
custom_lookups
custom_managers
custom_methods
custom_migration_operations
custom_pk Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
datatypes
dates
datetimes
db_functions
db_typecasts
db_utils
dbshell Fixed -- Added support for python-oracledb and deprecated cx_Oracle. 2023-08-10 10:11:53 +02:00
decorators Refs -- Made make_middleware_decorator to work with async functions. 2023-09-13 11:41:01 +02:00
defer
defer_regress
delete
delete_regress Refs -- Reallowed calling QuerySet.delete() after distinct(). 2023-07-07 07:08:28 +02:00
deprecation Fixed -- Prevented DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings from mutating the main STORAGES. 2023-09-11 13:04:32 +02:00
dispatch
distinct_on_fields
empty
empty_models
expressions Fixed -- Fixed queryset crash when filtering againts deeply nested OuterRef annotations. 2023-09-01 10:44:20 +02:00
expressions_case
expressions_window
extra_regress Fixed -- Allowed specifying parent classes in force_insert of Model.save(). 2023-06-29 21:52:52 +02:00
field_deconstruction Fixed -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03:00
field_defaults
field_subclassing
file_storage Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
file_uploads
files Fixed -- Added File.open() support for *args and **kwargs. 2023-09-11 06:07:47 +02:00
filtered_relation Fixed -- Fixed FilteredRelation() crash on conditional expressions. 2023-08-11 12:32:18 +02:00
fixtures
fixtures_model_package
fixtures_regress
flatpages_tests
force_insert_update Fixed -- Allowed specifying parent classes in force_insert of Model.save(). 2023-06-29 21:52:52 +02:00
foreign_object
forms_tests Fixed -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03:00
from_db_value
generic_inline_admin Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
generic_relations
generic_relations_regress Fixed -- Fixed GenericForeignKey crash when checking cache for primary keys with different types. 2023-09-08 08:47:11 +02:00
generic_views
get_earliest_or_latest
get_object_or_404
get_or_create
gis_tests Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
handlers
httpwrappers
humanize_tests
i18n Fixed -- Doc'd and tested --no-obsolete option of makemessages. 2023-07-14 08:47:30 +02:00
import_error_package
indexes
inline_formsets
inspectdb Fixed -- Raised RuntimeWarning when performing import-time queries. 2023-08-21 13:44:25 +02:00
introspection
invalid_models_tests Fixed -- Added GeneratedField model field. 2023-09-07 06:19:08 +02:00
known_related_objects
logging_tests
lookup
m2m_and_m2o
m2m_intermediary
m2m_multiple
m2m_recursive
m2m_regress
m2m_signals
m2m_through
m2m_through_regress
m2o_recursive
mail Refs -- Improved sanitize_address() error message for tuple with empty strings. 2023-07-17 11:03:36 +02:00
managers_regress
many_to_many
many_to_one
many_to_one_null
max_lengths
messages_tests Fixed -- Added django.contrib.messages.test.MessagesTestMixin.assertMessages(). 2023-09-05 11:55:37 +02:00
middleware
middleware_exceptions Refs -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
migrate_signals
migration_test_data_persistence
migrations Fixed -- Added support for serializing functions decorated with functools.lru_cache in migrations. 2023-09-13 15:57:18 -03:00
migrations2
model_enums Modernized enumeration helpers on Python 3.11+. 2023-09-13 08:30:21 +02:00
model_fields Fixed -- Added GeneratedField model field. 2023-09-07 06:19:08 +02:00
model_forms Fixed -- Established relationship between form fields and their help text. 2023-07-06 08:03:19 +02:00
model_formsets Fixed -- Made formset_factory() respect Form's default_renderer. 2023-07-24 09:09:53 +02:00
model_formsets_regress
model_indexes
model_inheritance Refs -- Fixed creating diamond-shaped MTI objects with ancestors inherited from different paths. 2023-06-20 08:40:35 +02:00
model_inheritance_regress
model_meta
model_options
model_package
model_regress
model_utils
modeladmin Fixed -- Added AdminSite.get_model_admin(). 2023-07-07 08:06:01 +02:00
multiple_database
mutually_referential
nested_foreign_keys
no_models
null_fk
null_fk_ordering
null_queries
one_to_one Fixed -- Made QuerySet.create() raise ValueError for reverse one-to-many relations. 2023-08-09 06:59:40 +02:00
or_lookups
order_with_respect_to
ordering
pagination Improved style of n-tuple wording in docs and comments. 2023-06-23 09:29:35 +02:00
postgres_tests Fixed -- Corrected number in error messages for Array(Min/Max)LengthValidator. 2023-06-18 14:32:51 +02:00
prefetch_related Fixed -- Fixed incorrect Prefetch()'s cache for singly related objects. 2023-09-07 12:56:08 +02:00
project_template
properties
proxy_model_inheritance
proxy_models
queries Fixed -- Prevented recreation of migration for constraints with a dict_keys. 2023-08-23 11:42:18 +02:00
queryset_pickle
raw_query
redirects_tests Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
requests_tests Fixed -- Raised BadRequest for non-UTF-8 requests with the application/x-www-form-urlencoded content type. 2023-08-25 21:27:22 +02:00
requirements Refs -- Bumped minimum supported version of docutils to 0.19. 2023-09-04 22:30:45 +02:00
reserved_names
resolve_url
responses
reverse_lookup
save_delete_hooks
schema Fixed -- Dropped support for SQLite < 3.27. 2023-08-04 06:35:13 +02:00
select_for_update
select_related
select_related_onetoone
select_related_regress
serializers Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
servers Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+. 2023-08-23 09:09:23 +02:00
sessions_tests
settings_tests
shell
shortcuts
signals
signed_cookies_tests
signing
sitemaps_tests Fixed -- Removed contrib.sitemaps.ping_google() and ping_google management command. 2023-07-10 05:59:35 +02:00
sites_framework
sites_tests
staticfiles_tests Refs -- Added system check for staticfiles storage in STORAGES setting. 2023-08-31 08:21:44 +02:00
str
string_lookup
swappable_models
syndication_tests
template_backends
template_loader
template_tests Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
templates
test_client Fixed -- Added support for following redirects to AsyncClient. 2023-08-30 06:12:25 +02:00
test_client_regress
test_exceptions
test_runner Fixed -- Added unittest's durations option to the test runner. 2023-08-31 07:14:58 +02:00
test_runner_apps
test_utils Refs -- Moved Parser.SELF_CLOSING_TAGS to django.utils.html.VOID_ELEMENTS 2023-07-14 10:25:00 +02:00
timezones
transaction_hooks
transactions
unmanaged_models
update
update_only_fields
urlpatterns
urlpatterns_reverse
user_commands Simplified call_command() calls. 2023-07-27 15:48:47 +02:00
utils_tests Fixed CVE-2023-41164 -- Fixed potential DoS in django.utils.encoding.uri_to_iri(). 2023-09-04 11:58:37 +02:00
validation Fixed -- Added support for NULLS [NOT] DISTINCT on PostgreSQL 15+. 2023-07-19 21:42:27 +02:00
validators Removed unneeded escapes in regexes. 2023-08-02 19:53:16 +02:00
version
view_tests Refs -- Made @sensitive_variables/sensitive_post_parameters decorators to work with async functions. 2023-06-23 13:29:40 +02:00
wsgi
xor_lookups
.coveragerc Fixed -- Measured test coverage on django-admin commands. 2023-09-07 15:47:26 -03:00
README.rst
runtests.py Fixed -- Measured test coverage on django-admin commands. 2023-09-07 15:47:26 -03:00
sitecustomize.py Fixed -- Measured test coverage on django-admin commands. 2023-09-07 15:47:26 -03:00
test_sqlite.py
urls.py

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/.