Commit Graph

53 Commits

Author SHA1 Message Date
Sergey Fedoseev 1933e56eca Removed uneeded generator expressions and list comprehensions. 2019-02-09 09:18:48 -05:00
Simon Charette 84e7a9f4a7 Switched setUp() to setUpTestData() where possible in Django's tests. 2018-11-27 09:35:17 -05:00
Abhinav Patil bf01994a5c Fixed #29804 -- Added 'did you mean' suggestions for unsupported lookup error. 2018-10-01 19:03:10 -04:00
Nick Pope b0fbfae093 Fixed #29503 -- Made __in lookup keep order of values in query.
Regression in 86eccdc8b6.
2018-06-20 09:29:06 -04:00
Dmitry Dygalo c979c0a2b8 Fixed #25718 -- Made a JSONField lookup value of None match keys that have a null value. 2018-04-04 10:53:46 -04:00
Mariusz Felisiak ba3078c92d Refs #29155 -- Fixed LookupTests.test_pattern_lookups_with_substr() crash on Oracle.
Test introduced in feb683c4c2 revealed
unexpected behavior on Oracle that allows concatenating NULL with string.
2018-03-15 09:54:24 -04:00
Mariusz Felisiak feb683c4c2
Fixed #29155 -- Fixed crash when database functions are used with pattern lookups.
Thanks Tim Graham and Sergey Fedoseev for reviews.
2018-03-14 10:00:07 +01:00
Raymond Hettinger aba9763b51 Refs #28814 -- Imported from collections.abc to fix Python 3.7 deprecation warnings.
https://bugs.python.org/issue25988
2018-02-05 11:42:47 -05:00
Tim Graham 1b73ccc4bf Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.
Regression in ec50937bcb.

Thanks Simon Charette for review.
2017-10-16 13:56:38 -04:00
Sergey Fedoseev 58da81a5a3 Fixed #27985 -- Fixed query for __exact=value when get_prep_value() converts value to None.
Also fixed crash of .filter(field__transform=None).
2017-07-31 15:34:07 -04:00
Sergey Fedoseev 0baea920c8 Fixed #28453 -- Made __exact=None lookup use transforms. 2017-07-31 13:31:04 -04:00
Mads Jensen a51c4de194 Used assertRaisesMessage() to test Django's error messages. 2017-07-29 19:07:23 -04:00
Tom Carrick 3159ad4df6 Fixed #27970 -- Allowed QuerySet.in_bulk() to fetch on fields besides primary key. 2017-07-21 08:34:35 -04:00
Jon Dufresne 21046e7773 Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Mariusz Felisiak 1b6f05e91f Fixed #21160 -- Fixed QuerySet.in_bulk() crash on SQLite when requesting more than 999 ids.
Thanks Andrei Picus and Anssi Kääriäinen for the initial patch
and Tim Graham for the review.
2017-03-27 18:43:40 +02:00
Tim Graham 29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham 5139832398 Refs #26285 -- Removed MySQL __search lookup per deprecation timeline. 2017-01-17 20:52:03 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Mariusz Felisiak 14986a0b9d Fixed #27268 -- Restored an invalid related field lookup error message in QuerySet filtering. 2016-09-27 15:00:36 -04:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Mads Jensen 0c1f71635f Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with assertSequenceEqual(). 2016-09-13 10:07:37 -04:00
Marc Tamlyn 8ddc79a799 Fixed #26285 -- Deprecated the MySQL-specific __search lookup. 2016-03-02 14:41:56 -05:00
Edwar Baron eb44172760 Fixed #25811 -- Added a helpful error when making _in queries across different databases. 2016-02-26 07:31:56 -05:00
Tim Graham 406675b1a0 Fixed #26176 -- Fixed E123 flake8 warnings. 2016-02-05 15:11:07 -05:00
Hasan 3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
userimack 60586dd737 Fixed #26125 -- Fixed E731 flake warnings. 2016-01-25 14:23:43 -05:00
Bryan Marty 62ca2dea04 Fixed #8065 -- Made id_list an optional argument for QuerySet.in_bulk(). 2015-12-26 17:57:19 -05:00
Ian Foote 32ef48aa56 Fixed #25609 -- Fixed regression in related field nested lookup error. 2015-10-27 13:49:00 -04:00
Tim Graham 9c5e272860 Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set. 2015-10-27 07:57:15 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Gavin Wahl 627c7eb7bf Fixed #25335 -- Fixed regression where QuerySet.iterator() didn't return an iterator. 2015-09-03 07:35:22 -04:00
Jon Dufresne b5e0eede40 Fixed #22394 -- Refactored built-in datetime lookups to transforms. 2015-04-20 15:11:11 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Jakub Roztocil 7131e14d00 Fixed #22489 -- missing implemenation for search lookup
When custom lookups were added, converting the search lookup to use
the new Lookup infrastructure wasn't done.

Some changes were needed to the added test, main change done by
committer was ensuring the test works on MySQL versions prior to 5.6.
2014-05-05 14:36:15 +03:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Anssi Kääriäinen 219d928852 Fixed #21863 -- supplemented get_lookup() with get_transform()
Also fixed #22124 -- Expanded explanation of exactly what is going on in
as_sql() methods.
2014-03-07 14:52:13 +00:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Alex Gaynor 9d740eb8b1 Fix all violators of E231 2013-10-26 12:15:03 -07:00
Tim Graham 96d1d4e292 Removed unused local variables in tests. 2013-10-19 08:31:38 -04:00
Anssi Kääriäinen c21e86ab9e Added field.attname to Options.name_map
The change also removed allow_explicit_fk from sql/query.py.
2013-07-31 16:02:36 +03:00
Claude Paroz 5c1143910e Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Loic Bistuer a9ea7d8c70 Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text() 2013-06-26 21:30:58 +07:00
Andrew Clark 273dc550a4 Fixed #20462 -- null/non-string regex lookups are now consistent
Thanks to noirbizarre for the report and initial patch.
2013-06-26 08:13:26 -04:00
Tim Graham 92c49d6f01 Revert "Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields."
This reverts commit 64041f0e6e.

lookup.tests.LookupTests.test_regex_non_string fails under Postgres.
We should also try to rewrite the test using an existing model.
2013-06-11 17:55:19 -04:00
Axel Haustant 64041f0e6e Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields. 2013-06-11 14:13:40 -04:00
Florian Apolloner af70dfcf31 Reverted the introduction of shared_models.
The recent improvements should make shared_models obsolete.

This reverts commit 1059da8de6, reversing
changes made to 4fa7f3cdd9.
2013-06-10 12:34:47 +02:00
Florian Apolloner f5d4849cbe Revert "Began implementing a shared set of test models to speed up tests."
This reverts commit 22b7870e40.
2013-06-10 12:22:40 +02:00