diff options
author | Loïc Bistuer <loic.bistuer@gmail.com> | 2016-02-19 02:27:55 +0700 |
---|---|---|
committer | Loïc Bistuer <loic.bistuer@gmail.com> | 2016-05-17 02:29:22 +0700 |
commit | 3a47d42fa33012b2156bf04058d933df6b3082d2 (patch) | |
tree | ed1ab104835ed71551eaccd7253e7b520c5e8d0c /tests/many_to_one | |
parent | 9935f97cd203bdcc722bc3d4e96858e221d96ff8 (diff) | |
download | django-3a47d42fa33012b2156bf04058d933df6b3082d2.tar.gz |
Fixed #20932, #25897 -- Streamlined manager inheritance.
Diffstat (limited to 'tests/many_to_one')
-rw-r--r-- | tests/many_to_one/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/many_to_one/tests.py b/tests/many_to_one/tests.py index c5a0e3f8f3..eaa01bbfcb 100644 --- a/tests/many_to_one/tests.py +++ b/tests/many_to_one/tests.py @@ -600,13 +600,13 @@ class ManyToOneTests(TestCase): # If the manager is marked "use_for_related_fields", it'll get used instead # of the "bare" queryset. Usually you'd define this as a property on the class, # but this approximates that in a way that's easier in tests. - School.objects.use_for_related_fields = True + School._default_manager.use_for_related_fields = True try: private_student = Student.objects.get(pk=private_student.pk) with self.assertRaises(School.DoesNotExist): private_student.school finally: - School.objects.use_for_related_fields = False + School._default_manager.use_for_related_fields = False def test_hasattr_related_object(self): # The exception raised on attribute access when a related object |