From fb48eb05816b1ac87d58696cdfe48be18c901f16 Mon Sep 17 00:00:00 2001 From: Daniel Pyrathon Date: Tue, 6 Jan 2015 19:16:35 -0500 Subject: Fixed #12663 -- Formalized the Model._meta API for retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch! --- tests/basic/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/basic') diff --git a/tests/basic/tests.py b/tests/basic/tests.py index 74515047f5..3ba94d058d 100644 --- a/tests/basic/tests.py +++ b/tests/basic/tests.py @@ -776,7 +776,7 @@ class ModelRefreshTests(TestCase): class TestRelatedObjectDeprecation(TestCase): def test_field_related_deprecation(self): - field = SelfRef._meta.get_field_by_name('selfref')[0] + field = SelfRef._meta.get_field('selfref') with warnings.catch_warnings(record=True) as warns: warnings.simplefilter('always') self.assertIsInstance(field.related, ForeignObjectRel) -- cgit v1.3