mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
This reverts4f8c7fd9d9and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report. Backport of5e0aa362d9from main
This commit is contained in:
@@ -1353,14 +1353,6 @@ class ForeignKeyToFieldTest(TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
def test_m2m_manager_reused(self):
|
||||
author = Author.objects.prefetch_related(
|
||||
"favorite_authors",
|
||||
"favors_me",
|
||||
).first()
|
||||
self.assertIs(author.favorite_authors, author.favorite_authors)
|
||||
self.assertIs(author.favors_me, author.favors_me)
|
||||
|
||||
|
||||
class LookupOrderingTest(TestCase):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user