summaryrefslogtreecommitdiff
path: root/tests/foreign_object
AgeCommit message (Collapse)Author
2025-02-11[5.2.x] Fixed #36149 -- Allowed subquery values against tuple exact and in ↵Simon Charette
lookups. Non-tuple exact and in lookups have specialized logic for subqueries that can be adapted to properly assign select mask if unspecified and ensure the number of involved members are matching on both side of the operator. Backport of 41239fe34d64e801212dccaa4585e4802d0fac68 from main.
2025-01-21[5.2.x] Fixed #36116 -- Optimized multi-column ForwardManyToOne prefetching.Simon Charette
Rely on ColPairs and TupleIn which support a single column to be specified to avoid special casing ForwardManyToOne.get_prefetch_querysets(). Thanks Jacob Walls for the report. Backport of 626d77e52a3f247358514bcf51c761283968099c from main.
2025-01-06Fixed #36048 -- Preferred ValueError to NotSupportedError for composite pk ↵Jacob Walls
sanity checks. These checks are not backend-dependent.
2024-11-04Refs #373 -- Added TupleIn subqueries.Bendeguz Csirmaz
2024-11-01Refs #373 -- Used a feature flag to disable composite subquery test on MySQL.Simon Charette
2024-10-14Refs #373 -- Added additional validations to tuple lookups.Bendeguz Csirmaz
2024-09-26Refs #373 -- Added support for using tuple lookups in filters.Bendeguz Csirmaz
2024-09-20Refs #373 -- Updated TupleIsNull lookup to check if any is NULL rather than all.Bendeguz Csirmaz
Regression in 1eac690d25dd49088256954d4046813daa37dc95.
2024-09-11Refs #373 -- Improved test coverage of tuple lookup checks.Bendeguz Csirmaz
This also removed unreachable checks.
2024-08-28Refs #16055 -- Adjusted deprecation warning stacklevel in ↵Simon Charette
get_joining_columns()/get_reverse_joining_columns().
2024-08-01Refs #373 -- Added tuple lookups.Bendeguz Csirmaz
2024-07-22Fixed #35614 -- Prevented SQLCompiler.as_subquery_condition() from mutating ↵Bendeguz Csirmaz
a query.
2023-04-18Refs #16055 -- Deprecated ↵David Wobrock
get_joining_columns()/get_reverse_joining_columns() methods.
2023-04-18Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock
relation on PostgreSQL.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
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
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
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-03Fixed #32996 -- Cached PathInfos on relations.Keryn Knight
PathInfo values are ostensibly static over the lifetime of the object for which they're requested, so the data can be memoized, quickly amortising the cost over the process' duration.
2021-07-22Fixed #32951 -- Removed Query.where_class & co.Nick Pope
Unused since 3caf957ed5eaa831a485abcb89f27266dbf3e82b.
2021-05-12Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
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-02-19Fixed typos in docs and a test comment.Yoo In Keun
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2018-11-27Adjusted code style of a few test data setup methods.Simon Charette
Thanks Mariusz for suggesting it.
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2018-11-08Fixed #29908 -- Fixed setting of foreign key after related set access if ↵Simon Charette
ForeignKey uses to_field. Adjusted known related objects handling of target fields which relies on from and to_fields and has the side effect of fixing a bug bug causing N+1 queries when using reverse foreign objects. Thanks Carsten Fuchs for the report.
2018-08-22Removed invalid Meta.ordering in a test model.Tim Graham
It never worked and was never used.
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2017-09-22Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby
support. Thanks Anssi Kääriäinen for contributing to the patch.
2017-08-10Refs #16043 -- Refactored internal fields value cache.Paulo
* Removed all hardcoded logic for _{fieldname}_cache. * Added an internal API for interacting with the field values cache. Thanks carljm and MarkusH for support.
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-06-01Sorted imports per isort 4.2.9.Tim Graham
2017-05-10Decreased max_length for char fields unless absolutely needed. (#8485)Florian Apolloner
2017-03-17Replaced type-specific assertions with assertEqual().Tim Graham
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2016-09-09Refs #25415 -- Fixed invalid models in the test suite.Adam Chainz
2016-05-19Fixed #26515 -- Fixed Query.trim_joins() for nested ForeignObjects.darius BERNARD
2016-04-13Refs #16508 -- Renamed the current "virtual" fields to "private".Michal Petrucha
The only reason why GenericForeignKey and GenericRelation are stored separately inside _meta is that they need to be cloned for every model subclass, but that's not true for any other virtual field. Actually, it's only true for GenericRelation.
2016-02-11Fixed #26153 -- Reallowed Q-objects in ↵Anssi Kääriäinen
ForeignObject.get_extra_descriptor_filter().
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-06Fixed #25746 -- Isolated inlined test models registration.Simon Charette
Thanks to Tim for the review.
2015-12-24Fixed #25972 -- Restored support for the isnull lookup with ForeignObject.Tomo Otsuka
2015-11-14Refs #25745 -- Isolated a foreign_object test.Simon Charette