summaryrefslogtreecommitdiff
path: root/tests/lookup/tests.py
AgeCommit message (Collapse)Author
2023-03-28[4.2.x] Fixed #34443 -- Fixed filtering by transforms on reverse relations.Mariusz Felisiak
Regression in ce6230aa976e8d963226a3956b45a8919215dbd8. Backport of 996c802229b93fe83c39842e56c6b8668464deaf from main
2023-03-28[4.2.x] Refs #29799 -- Added field instance lookups to suggestions in ↵Mariusz Felisiak
FieldErrors. Bug in cd1afd553f9c175ebccfc0f50e72b43b9604bd97. Backport of 3afdc9e9b47d5bdd1bd653633b4cb2357478ade5 from main
2022-12-21Removed unnecessary commas in tests.Mariusz Felisiak
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() ↵Mariusz Felisiak
where appropriate. Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e.
2022-09-22Fixed #34015 -- Allowed filtering by transforms on relation fields.Mariusz Felisiak
2022-05-19Fixed #33705 -- Fixed crash when using IsNull() lookup in filters.David Wobrock
Thanks Florian Apolloner for the report. Thanks Simon Charette for the review.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-02Fixed #32691 -- Made Exact lookup on BooleanFields compare directly to a ↵Roman
boolean value on MySQL. Performance regression in 37e6c5b79bd0529a3c85b8c478e4002fd33a2a1d. Thanks Todor Velichkov for the report. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-09Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and ↵Ian Foote
QuerySet.filter(). Thanks Hannes Ljungberg and Simon Charette for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-04-23Fixed #32673 -- Fixed lookups crash when comparing against lookups on ↵Simon Charette
PostgreSQL. Regression in 3a505c70e7b228bf1212c067a8f38271ca86ce09. Nonlitteral right-hand-sides of lookups need to be wrapped in parentheses to avoid operator precedence ambiguities. Thanks Charles Lirsac for the detailed report.
2021-03-10Refs #32508 -- Raised TypeError instead of using "assert" on unsupported ↵Mariusz Felisiak
operations for sliced querysets.
2021-01-14Refs #30841 -- Made isnull lookup raise ValueError for non-boolean values.Mariusz Felisiak
Per deprecation timeline.
2020-11-06Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.Hasan Ramezani
This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-08-26Fixed #31918 -- Allowed QuerySet.in_bulk() to fetch on a single distinct field.Kaustubh
2020-06-11Fixed #31667 -- Made __in lookup ignore None values.Adam Johnson
2020-04-23Fixed #31500 -- Fixed detecting of unique fields in QuerySet.in_bulk() when ↵Hannes Ljungberg
using Meta.constraints. Detection of unique fields now takes into account non-partial unique constraints.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-10-21Fixed #30841 -- Deprecated using non-boolean values for isnull lookup.André Ericson
2019-09-20Fixed #30771 -- Fixed exact lookup against queries with selected columns.James Timmins
Use pre-existing select fields (and thereby GROUP BY fields) from subquery if they were specified, instead of always defaulting to pk. Thanks Aur Saraf for the report and Simon Charette for guidance.
2019-08-17Fixed #29545 -- Fixed using filter lookups againts nested subquery expressions.Simon Charette
Made sql.Where resolve lhs of its child nodes. This is necessary to allow filter lookups against nested subquery expressions to properly resolve their OuterRefs to Cols. Thanks Oskar Persson for the simplified test case.
2019-08-12Refs #25367 -- Added test for Exists() lookup rhs.Simon Charette
2019-04-01Used QuerySet.bulk_create() in lookup.tests.JangHyukJin
2019-02-09Removed uneeded generator expressions and list comprehensions.Sergey Fedoseev
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2018-10-01Fixed #29804 -- Added 'did you mean' suggestions for unsupported lookup error.Abhinav Patil
2018-06-20Fixed #29503 -- Made __in lookup keep order of values in query.Nick Pope
Regression in 86eccdc8b67728d84440a46e5bf62c78f2eddf6d.
2018-04-04Fixed #25718 -- Made a JSONField lookup value of None match keys that have a ↵Dmitry Dygalo
null value.
2018-03-15Refs #29155 -- Fixed LookupTests.test_pattern_lookups_with_substr() crash on ↵Mariusz Felisiak
Oracle. Test introduced in feb683c4c2c5ecfb61e4cb490c3e357450c0c0e8 revealed unexpected behavior on Oracle that allows concatenating NULL with string.
2018-03-14Fixed #29155 -- Fixed crash when database functions are used with pattern ↵Mariusz Felisiak
lookups. Thanks Tim Graham and Sergey Fedoseev for reviews.
2018-02-05Refs #28814 -- Imported from collections.abc to fix Python 3.7 deprecation ↵Raymond Hettinger
warnings. https://bugs.python.org/issue25988
2017-10-16Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.Tim Graham
Regression in ec50937bcbe160e658ef881021402e156beb0eaf. Thanks Simon Charette for review.
2017-07-31Fixed #27985 -- Fixed query for __exact=value when get_prep_value() converts ↵Sergey Fedoseev
value to None. Also fixed crash of .filter(field__transform=None).
2017-07-31Fixed #28453 -- Made __exact=None lookup use transforms.Sergey Fedoseev
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-07-21Fixed #27970 -- Allowed QuerySet.in_bulk() to fetch on fields besides ↵Tom Carrick
primary key.
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-03-27Fixed #21160 -- Fixed QuerySet.in_bulk() crash on SQLite when requesting ↵Mariusz Felisiak
more than 999 ids. Thanks Andrei Picus and Anssi Kääriäinen for the initial patch and Tim Graham for the review.
2017-02-03Fixed spelling of "nonexistent".Tim Graham
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #26285 -- Removed MySQL __search lookup per deprecation timeline.Tim Graham
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-27Fixed #27268 -- Restored an invalid related field lookup error message in ↵Mariusz Felisiak
QuerySet filtering.
2016-09-17Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.Tim Graham
http://bugs.python.org/issue27364
2016-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2016-03-02Fixed #26285 -- Deprecated the MySQL-specific __search lookup.Marc Tamlyn
2016-02-26Fixed #25811 -- Added a helpful error when making _in queries across ↵Edwar Baron
different databases.
2016-02-05Fixed #26176 -- Fixed E123 flake8 warnings.Tim Graham
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan