summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2023-06-01Fixed #34612 -- Fixed QuerySet.only() crash on reverse relationships.Simon Charette
Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879. Thanks Ian Cubitt for the report. This also corrected test_inheritance_deferred2() test which was previously properly defined and marked as an expected failure but was then wrongly adjusted to mask the lack of support for per-alias deferral that was fixed by #21204.
2023-06-01Refs #34570 -- Added extra tests for QuerySet.only() noops.Simon Charette
2023-06-01Fixed #34617 -- Enabled user zooming on mobile devices in the admin.Cheuk Ting Ho
2023-05-31Fixed #34606 -- Fixed Right() function with zero length on Oracle and SQLite.Kacper Wolkiewicz
2023-05-25Made MigrationRecorder cache has_table() result if django_migrations table ↵Tom Forbes
exists.
2023-05-24Fixed #34590 -- Reverted "Refs #33308 -- Improved adapting DecimalField ↵David Sanders
values to decimal." This reverts 7990d254b0af158baf827fafbd90fe8e890f23bd. Thanks Marc Odermatt for the report.
2023-05-24Fixed #34592 -- Removed Safari/Chrome workaround for system fonts.minusf
2023-05-23Refs #34118 -- Fixed ↵Mariusz Felisiak
FunctionalTests.test_cached_property_reuse_different_names() on Python 3.12+. Python 3.12+ no longer wraps exceptions in __set_name__, see https://github.com/python/cpython/commit/55c99d97e14618dfce41472dd4446f763b0da13f
2023-05-23Refs #31949 -- Made @no_append_slash decorator to work with async functions.Ben Lomax
2023-05-23Fixed #34551 -- Fixed QuerySet.aggregate() crash when referencing subqueries.Simon Charette
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7. Refs #28477. Thanks Denis Roldán and Mariusz for the test.
2023-05-23Refs #34551 -- Fixed QuerySet.aggregate() crash on precending aggregation ↵Simon Charette
reference. Regression in 1297c0d0d76a708017fe196b61a0ab324df76954. Refs #31679.
2023-05-22Fixed #34587 -- Allowed customizing table name normalization in inspectdb ↵Andrii Kohut
command.
2023-05-22Fixed #34577 -- Added escapeseq template filter.Arthur Moreira
2023-05-20Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to ↵Ben Lomax
work with async functions.
2023-05-20Moved clickjacking decorator tests into decorators/test_clickjacking.py.Ben Lomax
This also adds extra assertions.
2023-05-19Fixed #34578 -- Made "join" template filter respect autoescape for joiner.rajeeshp
2023-05-18Fixed #34565 -- Added support for async checking of user passwords.HappyDingning
2023-05-17Refs #32339 -- Fixed super() call in deprecated renderers.Carlton Gibson
Missing function call `()` leads to: TypeError: descriptor '__init__' of 'super' object needs an argument Regression in b209518089131c6b4afd18b1d9c320ba3521c5ab.
2023-05-17Fixed #34568 -- Made makemigrations --update respect --name option.Mariusz Felisiak
Thanks David Sanders for the report.
2023-05-17Fixed #34570 -- Silenced noop deferral of many-to-many and GFK.Simon Charette
While deferring many-to-many and GFK has no effect, the previous implementation of QuerySet.defer() ignore them instead of crashing. Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879. Thanks Paco Martínez for the report.
2023-05-16Fixed #34539 -- Restored get_prep_value() call when adapting JSONFields.Julie Rymer
Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318.
2023-05-12Fixed #470 -- Added support for database defaults on fields.Ian Foote
Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
2023-05-11Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle.Mariusz Felisiak
2023-05-10Fixed #34553 -- Fixed improper % escaping of literal in constraints.Simon Charette
Proper escaping of % in string literals used when defining constaints was attempted (a8b3f96f6) by overriding quote_value of Postgres and Oracle schema editor. The same approach was used when adding support for constraints to the MySQL/MariaDB backend (1fc2c70). Later on it was discovered that this approach was not appropriate and that a preferable one was to pass params=None when executing the constraint creation DDL to avoid any form of interpolation in the first place (42e8cf47). When the second patch was applied the corrective of the first were not removed which caused % literals to be unnecessary doubled. This flew under the radar because the existings test were crafted in a way that consecutive %% didn't catch regressions. This commit introduces an extra test for __exact lookups which highlights more adequately % doubling problems but also adjust a previous __endswith test to cover % doubling problems (%\% -> %%\%%). Thanks Thomas Kolar for the report. Refs #32369, #30408, #30593.
2023-05-10Refs #34553 -- Split constraint escaping test in subtests.Simon Charette
This ensures that constraint violations are tested in isolation from each other as an IntegrityError only ensures a least one constraint is violated. For example, the assertion added in 42e8cf4 break both the name_constraint_rhs and the rebate_constraint constraints and thus doesn't constitute a proper regression test. Refs #32369.
2023-05-10Fixed #34554 -- Fixed Reverse(Value(…)) crash on Oracle.Mariusz Felisiak
2023-05-09Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations ↵Akash Kumar Sen
when optimizing migrations.
2023-05-08Fixed #34544 -- Avoided DBMS_LOB.SUBSTR() wrapping with IS NULL condition on ↵Mariusz Felisiak
Oracle. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca. Thanks Michael Smith for the report. This also reverts commit 1e4da439556cdd69eb9f91e07f99cf77997e70d2.
2023-05-04Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow ↵Mariusz Felisiak
isn't installed. Follow up to fb4c55d9ec4bb812a7fb91fa20510d91645e411b.
2023-05-04Fixed #34535 -- Fixed SQLite dbshell crash on pathlib.Path when handling ↵Jan Pieter Waagmeester
CommandError. Regression in 5b884d45ac5b76234eca614d90c83b347294c332.
2023-05-03Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of ↵Mariusz Felisiak
validation when uploading multiple files using one form field. Thanks Moataz Al-Sharida and nawaik for reports. Co-authored-by: Shai Berger <shai@platonix.com> Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-05-03Fixed #34529, Refs #34525 -- Reduced index operations with ↵Mariusz Felisiak
Meta.indexes/index_together when optimizing migrations. This makes squashing migrations an available path for changing Meta.index_together, which is deprecated, to Meta.indexes. Follow up to f81032572107846922745b68d5b7191058fdd5f5.
2023-05-03Fixed #34517 -- Avoided connection post_init signal to ImageField without ↵Orhan Hirsch
width/height fields.
2023-05-02Refs #31369 -- Improved hint message in NullBooleanField's deprecation warning.Paul Brown
2023-05-02Fixed #34513 -- Added system check for relational fields in ↵Bakdolot
ModelAdmin.list_display.
2023-05-02Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n ↵Mariusz Felisiak
patterns are used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. This reverts commit 94e7f471c4edef845a4fe5e3160132997b4cca81 (refs #34069) and partly reverts commit 3b4728310a7a64f8fcc548163b0aa5f98a5c78f5. Thanks Anthony Baillard for the report. Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-05-01Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations.Mariusz Felisiak
2023-05-01Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin
self-referential subqueries if supported.
2023-04-28Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.Coen van der Kamp
This also deprecates "http" as the default scheme.
2023-04-27Restored multiprocessing concurrency on coverage.py settingsMarc Gibbons
* Revert "Reverted "Fixed #33213 -- Doc'd testing code coverage in parallel and used it."" This reverts commit 78da5ca0c1f2ab3201f8f6cd629e80d805ea023d. * Restored coverage multiprocess concurrency with threads Investigating https://github.com/nedbat/coveragepy/issues/1585 revealed that thread tracing gets disabled when passing `concurrency = multiprocessing`. Adding `thread` restores it, and ensures that the `auser()` is reported as covered since the test suite uses `AsyncToSync` to execute this middleware (which spawns threads).
2023-04-27Avoided creating default form fields in fields_for_model() when declared on ↵Mariusz Felisiak
form.
2023-04-26Fixed #34518 -- Fixed crash of random() template filter with an empty list.David Sanders
2023-04-26Fixed #34512 -- Restored breadcrumbs on admin app index view.Mariusz Felisiak
Thanks Adam (ataylor32) for the report. Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7.
2023-04-25Replaced docutils link by PyPI reference.Claude Paroz
2023-04-25Refs #31949 -- Made @never_cache and @cache_control() decorators to work ↵Ben Lomax
with async functions. Thanks Carlton Gibson and Mariusz Felisiak for reviews.
2023-04-25Added more tests for @cache_control decorator.Ben Lomax
2023-04-24Fixed #34481 -- Added system check for reverse related fields in ↵Bakdolot
ModelAdmin.list_display.
2023-04-24Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.Simon Charette
The previous implementation resolved condition at Join compilation time which required introducing a specialized expression resolving mode to alter the join reuse logic solely during that phase. FilteredRelation.condition is now resolved when the relation is first referenced which maintains the existing behavior while allowing the removal of the specialized resolving mode and address an issue where conditions couldn't spawn new joins.
2023-04-21Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation ↵Petter Friberg
when db_collation is set in related field.
2023-04-21Added SchemaTests._add_ci_collation() hook.Mariusz Felisiak