summaryrefslogtreecommitdiff
path: root/tests/model_fields
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34539 -- Restored get_prep_value() call when adapting JSONFields.Julie Rymer2023-05-161-0/+23
| | | | Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318.
* Fixed #34517 -- Avoided connection post_init signal to ImageField without ↵Orhan Hirsch2023-05-031-0/+8
| | | | width/height fields.
* Fixed #34388 -- Allowed using choice enumeration types directly on model and ↵T. Franzel2023-03-214-4/+16
| | | | form fields.
* Fixed #27397 -- Prevented integer overflows on integer field lookups.Simon Charette2023-03-091-0/+39
| | | | | This prevents a sqlite3 crash and address a potential DDoS vector on PostgreSQL caused by full-table-scans on overflows.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-0/+1
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Refs #34100 -- Made file upload tests use Storage.exists() where appropriate.Francesco Panico2022-12-301-3/+6
|
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-1/+1
| | | | | | | Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #33308 -- Deprecated support for passing encoded JSON string literals ↵Simon Charette2022-12-011-2/+29
| | | | | | | to JSONField & co. JSON should be provided as literal Python objects an not in their encoded string literal forms.
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-2/+2
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Fixed #33966 -- Added support for using KeyTextTransform from lookup.Allen Jonathan David2022-09-161-5/+19
|
* Fixed #33954 -- Prevented models.DecimalField from accepting NaN, Inf, and ↵Mohamed Karam2022-08-271-4/+13
| | | | -Inf values.
* Removed unused path variable in model_fields tests.Claude Paroz2022-08-231-2/+0
|
* Refs #26511 -- Fixed json.KeyTextTransform() on MySQL/MariaDB.Mariusz Felisiak2022-08-181-1/+13
|
* Removed obsolete assertions in BooleanFieldTests.test_return_type().Mariusz Felisiak2022-06-032-6/+0
| | | | Added in e9bbdb39de3047761fa8d03d5241eccd571093ff. Obsolete since e9103402c0fa873aea58a6a11dba510cd308cb84.
* Refs #31223 -- Added __class_getitem__() to ForeignKey.Collin Anderson2022-04-221-0/+3
|
* Relaxed some query ordering assertions in various tests.Mariusz Felisiak2022-04-143-23/+23
| | | It accounts for differences seen on MySQL with MyISAM storage engine.
* Fixed #33626 -- Cleared cache when unregistering a lookup.Himanshu-Balasamanta2022-04-121-1/+0
|
* Fixed #33552 -- Fixed JSONField has key lookups with numeric keys on ↵Sage Abdullah2022-03-151-0/+27
| | | | MariaDB, MySQL, Oracle, and SQLite.
* Removed redundant QuerySet.all() calls in docs and tests.Nick Pope2022-02-221-1/+1
| | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-072-3/+10
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-0722-843/+1078
|
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-031-2/+1
| | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
* Fixed #33441 -- Restored immutability of models.Field.__hash__().Adam Johnson2022-01-141-3/+8
| | | | Regression in 502e75f9ed5476ffe8229109acf0c23999d4b533.
* Fixed #33033 -- Prevented models.DecimalField from accepting NaN values.Chinmoy Chakraborty2021-09-281-0/+8
|
* Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal2021-07-152-0/+37
| | | | | | django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak2021-05-131-0/+10
| | | | | | | | | | | | | - Validate filename returned by FileField.upload_to() not a filename passed to the FileField.generate_filename() (upload_to() may completely ignored passed filename). - Allow relative paths (without dot segments) in the generated filename. Thanks to Jakub Kleň for the report and review. Thanks to all folks for checking this patch on existing projects. Thanks Florian Apolloner and Markus Holtermann for the discussion and implementation idea. Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3.
* Fixed #32620 -- Allowed subclasses of Big/SmallAutoField for DEFAULT_AUTO_FIELD.Adam Johnson2021-04-081-1/+13
|
* Fixed #32483 -- Fixed QuerySet.values()/values_list() on JSONField key ↵Mariusz Felisiak2021-03-231-0/+10
| | | | | | transforms with booleans on SQLite. Thanks Matthew Cornell for the report.
* Refs #32483 -- Added tests QuerySet.values()/values_list() on key transforms ↵Mariusz Felisiak2021-03-231-3/+5
| | | | with structures containing booleans.
* Refs #31936 -- Added tests for __in lookup on JSONField key transforms with ↵Mariusz Felisiak2021-03-231-0/+2
| | | | booleans.
* Fixed #32411 -- Fixed __icontains lookup for JSONField on MySQL.Hasan Ramezani2021-02-051-0/+6
|
* Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.Mariusz Felisiak2021-01-144-38/+17
|
* Fixed #32252 -- Fixed __isnull=True on key transforms on SQLite and Oracle.sage2020-12-111-0/+4
| | | | __isnull=True on key transforms should not match keys with NULL values.
* Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani2020-12-105-19/+4
| | | | | failures. Co-authored-by: Tim Graham <timograham@gmail.com>
* Fixed #25534, Fixed #31639 -- Added support for transform references in ↵Ian Foote2020-11-272-4/+63
| | | | | | expressions. Thanks Mariusz Felisiak and Simon Charette for reviews.
* Fixed #32203 -- Fixed QuerySet.values()/values_list() crash on key ↵sage2020-11-251-0/+5
| | | | | | transforms with non-string values on SQLite. Thanks Gordon Wrigley for the report.
* Refs #32203 -- Added tests for QuerySet.values()/values_list() on key ↵sage2020-11-251-0/+13
| | | | transforms with non-trivial values.
* Added test for filtering JSONField key transforms with quoted strings.Mariusz Felisiak2020-11-241-0/+7
|
* Fixed #32182 -- Fixed crash of JSONField nested key transforms with subquery ↵Hannes Ljungberg2020-11-101-0/+12
| | | | annotations on PostgreSQL.
* Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.Hasan Ramezani2020-11-061-4/+3
| | | | | | | | 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>
* Fixed #32132 -- Fixed column types in m2m intermediary tables for ↵David-Wobrock2020-11-021-0/+10
| | | | Positive(Big/Small)IntegerFields.
* Refs #32132 -- Added rel_db_type() tests for auto and integer fields.David-Wobrock2020-11-022-0/+16
|
* Replaced @no_oracle skips with DatabaseFeatures.allows_group_by_lob.Tim Graham2020-10-221-1/+1
|
* Refs #32096 -- Fixed ExpressionWrapper crash with JSONField key transforms.Mariusz Felisiak2020-10-141-1/+15
| | | | | | Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd. Thanks Simon Charette and Igor Jerosimić for the report.
* Refs #32096 -- Fixed __in lookup crash against key transforms for JSONField.Mariusz Felisiak2020-10-141-0/+10
| | | | | | | Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd and 1251772cb83aa4106f526fe00738e51c0eb59122. Thanks Simon Charette and Igor Jerosimić for the report.
* Used assertRaisesMessage() in CharField tests.David Smith2020-09-251-4/+8
|
* Fixed #31777 -- Added support for database collations to Char/TextFields.Tom Carrick2020-09-212-1/+21
| | | | Thanks Simon Charette and Mariusz Felisiak for reviews.
* Refs #23130 -- Added test for BooleanField choices generation.Jacob Walls2020-09-101-0/+9
|
* Fixed #31750 -- Made models.Field equality compare models for inherited fields.Ryan Hiebert2020-09-091-0/+30
|
* Refs #31894 -- Added tests for JSONField key lookups with QuerySet.exclude().jpribyl2020-09-041-1/+47
|