summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2023-09-13Refs #31949 -- Made make_middleware_decorator to work with async functions.Ben Lomax
2023-09-13Added more tests for decorators.Ben Lomax
2023-09-13Modernized enumeration helpers on Python 3.11+.Nick Pope
- use @enum.property https://docs.python.org/3/library/enum.html#enum.property - use @enum.nonmember Using @property on an enum class does not yield the expected result. do_not_call_in_templates attribute works because a @property instance is truthy. We can make this a literal True value as expected by using @enum.nonmember in Python 3.11+. https://docs.python.org/3/library/enum.html#enum.nonmember - used enum.IntEnum/StrEnum Python 3.11+ has ReprEnum which uses int.__str__() and str.__str__() for __str__() in the `IntEnum` and `StrEnum` subclasses. We can emulate that for Python < 3.11. https://docs.python.org/3/library/enum.html#enum.ReprEnum https://docs.python.org/3/library/enum.html#enum.IntEnum https://docs.python.org/3/library/enum.html#enum.StrEnum
2023-09-12Renamed ChoicesMeta to ChoicesType.Nick Pope
This also uses enum.EnumType for Python 3.11+ as Python 3.11 renamed EnumMeta to EnumType. While the former is still available as an alias of the latter for now, let's prefer the canonical name for this. Check out https://docs.python.org/3/library/enum.html#enum.EnumType
2023-09-11Fixed #34752 -- Fixed handling ASGI http.disconnect for streaming responses.Sam Toyer
2023-09-11Fixed #34821 -- Prevented DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings ↵Mariusz Felisiak
from mutating the main STORAGES. Regression in 6b965c600054f970bdf94017ecf2e0e6e0a4326b.
2023-09-11Fixed #34824 -- Prevented unnecessary AlterField when ↵donghao
ForeignObject.from_fields/to_fields is not a tuple.
2023-09-11Fixed #34642 -- Added File.open() support for *args and **kwargs.Yves Weissig
2023-09-09Fixed #34820 -- Fixed migrations crash when changing a ForeignObject field.donghao
2023-09-08Fixed #34816 -- Fixed GenericForeignKey crash when checking cache for ↵Oguzhan Akan
primary keys with different types.
2023-09-07Fixed #34810 -- Measured test coverage on django-admin commands.Jacob Walls
2023-09-07Fixed #34791 -- Fixed incorrect Prefetch()'s cache for singly related objects.Maxime Toussaint
Changed the cache name used for singly related objects to be the to_attr parameter passed to a Prefetch object. This fixes issues with checking if values have already been fetched in cases where the Field already has some prefetched value, but not for the same model attr.
2023-09-07Fixed #31300 -- Added GeneratedField model field.Jeremy Nauta
Thanks Adam Johnson and Paolo Melchiorre for reviews. Co-Authored-By: Lily Foote <code@lilyf.org> Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-05Fixed #34730 -- Added ↵François Freitag
django.contrib.messages.test.MessagesTestMixin.assertMessages().
2023-09-04Refs #34233 -- Bumped minimum supported version of docutils to 0.19.Jacob Walls
2023-09-04Fixed CVE-2023-41164 -- Fixed potential DoS in ↵Mariusz Felisiak
django.utils.encoding.uri_to_iri(). Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report. Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-09-01Fixed #34778 -- Avoided importing modules in startapp/startproject.Jacob Walls
2023-09-01Fixed #34768 -- Avoided initializing colorama on non-Windows platforms.Sulabh Katila
2023-09-01Fixed #34803 -- Fixed queryset crash when filtering againts deeply nested ↵willzhao
OuterRef annotations. Thanks Pierre-Nicolas Rigal for the report. Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.
2023-08-31Refs #32355 -- Removed unnecessary getattr() call.Mariusz Felisiak
options.test_name_patterns is always defined. Follow up to ec0ff406311de88f4e2a135d784363424fe602aa.
2023-08-31Refs #34712 -- Added system check for staticfiles storage in STORAGES setting.Bruno Alla
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-08-31Fixed #34210 -- Added unittest's durations option to the test runner.David Smith
2023-08-31Fixed #34547 -- Deprecated DatabaseOperations.field_cast_sql().David Smith
2023-08-30 Fixed #31262 -- Added support for mappings on model fields and ↵Nick Pope
ChoiceField's choices.
2023-08-30Fixed #34799 -- Made MySQL introspection skip cross-database relations.John Whitman
2023-08-30Fixed #34757 -- Added support for following redirects to AsyncClient.Olivier Tabone
2023-08-28Fixed #34787 -- Fixed autoreloader crash when run from installed script on ↵sarahboyce
Windows.
2023-08-25Fixed #34709 -- Raised BadRequest for non-UTF-8 requests with the ↵Mariusz Felisiak
application/x-www-form-urlencoded content type. Thanks Eki Xu for the report.
2023-08-25Refs #34730 -- Made Message importable from django.contrib.messages.François Freitag
2023-08-24Refs #24121 -- Added __repr__() to Message.François Freitag
2023-08-23Fixed #34744 -- Prevented recreation of migration for constraints with a ↵David Sanders
dict_keys. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-08-23Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+.Mariusz Felisiak
- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads - backends.tests.ThreadTests.test_default_connection_thread_local: on SQLite, close() doesn't explicitly close in-memory connections. - servers.tests.LiveServerInMemoryDatabaseLockTest - test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support Check out https://github.com/python/cpython/pull/108015.
2023-08-22Removed unnecessary trailing commas in tests.konsti
2023-08-22Added tests for model field's choices iterator/iterable values.Natalia
2023-08-21Fixed #33143 -- Raised RuntimeWarning when performing import-time queries.Florian Zimmermann
2023-08-20Fixed utils_tests.test_lazyobject.SimpleLazyObjectPickleTestCase.Mariusz Felisiak
SimpleLazyObjectPickleTestCase executes database queries so it must inherit from django.test.TestCase.
2023-08-19Fixed #34779 -- Avoided unnecessary selection of non-nullable m2m fields ↵Juan Alvarez
without natural keys during serialization. By using `select_related(None)` instead of `select_related()`, the unnecessary joins are completely avoided. Note that the current tests already covers the change, when the field is not `null=True`. Regression in f9936deed1ff13b20e18bd9ca2b0750b52706b6c.
2023-08-18Fixed #34773 -- Fixed syncing DEFAULT_FILE_STORAGE/STATICFILES_STORAGE ↵Mariusz Felisiak
settings with STORAGES. Thanks Petr Dlouhý for the report. Bug in 32940d390a00a30a6409282d314d617667892841.
2023-08-11Fixed #34362 -- Fixed FilteredRelation() crash on conditional expressions.Francesco Panico
Thanks zhu for the report and Simon Charette for reviews.
2023-08-11Fixed #34743 -- Fixed Meta.constraints validation crash when using pk.Francesco Panico
Thanks Nwawel A Iroume for the report.
2023-08-10Fixed #33817 -- Added support for python-oracledb and deprecated cx_Oracle.Jingbei Li
2023-08-10Fixed non-deterministic order in SubqueryTests.test_slice_subquery_and_query.Mariusz Felisiak
Slice on unordered subquery may be non-deterministic in some databases.
2023-08-09Refs #34233 -- Bumped required cx_Oracle to 8.3.Mariusz Felisiak
This bumps minimum supported versions of cx_Oracle to the first release to support Python 3.10.
2023-08-09Fixed #34692 -- Made autoreloader reset cached template loader for default ↵priyank.panchal
renderer.
2023-08-09Fixed #34586 -- Made QuerySet.create() raise ValueError for reverse ↵Mariana
one-to-many relations.
2023-08-08Added IntegerField tests for checks for invalid choices.Nick Pope
2023-08-08Fixed #34542 -- Made createsuperuser handle required blank fields in ↵Mateusz Więckowski
non-interactive mode.
2023-08-05Fixed #34739 -- Added GEOSGeometry.equals_identical() method.Olivier Tabone
2023-08-04Fixed TransactionalTests.test_password_with_at_sign() isolation on Oracle.Mariusz Felisiak
2023-08-04Fixed #34754 -- Fixed JSONField check constraints validation on NULL values.Simon Charette
The __isnull lookup of JSONField must special case Value(None, JSONField()) left-hand-side in order to be coherent with its convoluted null handling. Since psycopg>=3 offers no way to pass a NULL::jsonb the issue is resolved by optimizing IsNull(Value(None), True | False) to True | False. Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318. Thanks Alexandre Collet for the report.