summaryrefslogtreecommitdiff
path: root/tests/prefetch_related
AgeCommit message (Collapse)Author
2020-12-16Fixed #32089 -- Fixed prefetch_related_objects() when some objects are ↵Alexey Nigin
already fetched. Thanks Dennis Kliban for the report and Adam Johnson for the initial patch. Co-authored-by: Adam Johnson <me@adamj.eu>
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-10-06Refs #20577 -- Deferred filtering of prefetched related querysets by reverse ↵Bob Renwick
m2o relation.
2020-05-15Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.Simon Charette
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-12-09Refs #31044 -- Fixed error message when using Prefetch with a values_list() ↵Mariusz Felisiak
queryset.
2019-12-09Fixed #31044 -- Errored nicely when using Prefetch with a raw() queryset.Hasan Ramezani
2019-10-21Fixed #20577 -- Deferred filtering of prefetched related querysets.Alex Aktsipetrov
Added internal interface to QuerySet that allows to defer next filter call till .query is accessed. Used it to optimize prefetch_related(). Thanks Simon Charette for the review.
2019-10-01Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ElizabethU
implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically.
2019-10-01Refs #30651 -- Added tests for Prefetch.__eq__().Mariusz Felisiak
2019-08-26Fixed typo in tests/prefetch_related/tests.py comment.Tim Gates
2019-08-23Fixed typos in test names and a comment.Min ho Kim
2019-05-16Fixed #30482 -- Prevented unnecessary evaluation of lookup.queryset in ↵Iain Watts
prefetch_related_objects().
2019-04-16Fixed #30368 -- Fixed prefetch_related() for GenericForeignKey when PK is ↵Vinny Do
also a FK.
2019-04-14Fixed #30343 -- Fixed prefetch_related() for GenericForeignKey when PK of ↵Mariusz Felisiak
related field is UUIDField.
2019-01-10Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in ↵Simon Charette
favor of databases.
2018-12-27Followed style guide for model attribute ordering.Matt Wiens
2018-05-27Fixed #29230 -- Fixed nested prefetches that clash with descriptors.Paulo
2018-04-19Fixed #28600 -- Added prefetch_related() support to RawQuerySet.Adnan Umer
2018-02-05Refs #28723 -- Fixed stale prefetch_related cache after add/remove.Jon Dufresne
Regression in 514b2c989a948e3c59bda0da0c9427acf643cf5b.
2018-02-05Made prefetch_related tests use assertCountEqual() for unordered sequences.Jon Dufresne
2017-11-02Fixed #28723 -- Fixed RelatedManager's prefetch_related() cache name.Mike Hansen
2017-08-21Fixed #28375 -- Fixed KeyError crash on reverse prefetch of a model with ↵Paulo
OneToOneField primary key to a non-pk field.
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-04Refs #25546 -- Added detailed comments for prefetch_related test.François Freitag
2017-05-04Fixed #27554 -- Fixed prefetch_related() crash when fetching relations in ↵François Freitag
nested Prefetches.
2017-04-19Fixed #28096 -- Allowed prefetch calls with ModelIterable subclassesClaude Paroz
Regression in 7ec330eeb96d0874949eacb8ed1bbb97e11807e1. Thanks Tim Graham for the review.
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-24Removed unneeded force_text calls in the test suiteClaude Paroz
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #26226 -- Removed support for related manager classes without a ↵Tim Graham
_apply_rel_filters() method. Per deprecation timeline.
2017-01-09Made prefetch_related SQL inspection tests less brittle.François Freitag
After refs #16614, integers might appear outside the WHERE clause.
2016-11-14Fixed #27463 -- Fixed E741 flake8 warnings.Ramin Farajpour Cami
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-07-19Fixed #26916 -- Fixed prefetch_related when using a cached_property as to_attr.Simon Charette
Thanks Trac alias karyon for the report and Tim for the review.
2016-05-31Fixed #26676 -- Prevented prefetching to_attr from caching its result in ↵Simon Charette
through attr. Thanks Ursidours for the report.
2016-05-03Refs #26565 -- Errored nicely when using Prefetch with a values() queryset.Simon Charette
Thanks Maxime Lorant for the report and Anssi for the suggestion.
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-03-02Fixed #26226 -- Made related managers honor the queryset used for ↵Simon Charette
prefetching their results. Thanks Loïc for the suggested improvements and Tim for the review.
2016-03-02Refs #17001 -- Added a test for custom prefetch related queryset on generic ↵Simon Charette
relations.
2016-02-26Fixed #26264 -- Fixed prefetch_related() crashes with values_list(flat=True)Attila Tovt
2016-02-26Fixed #25279 -- Made prefetch_related_objects() public.Adam Chainz
2016-02-23Used setupTestData in prefetch_related tests.Simon Charette
2016-01-26Fixed #25546 -- Prevented duplicate queries with nested prefetch_related().François Freitag