mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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!
This commit is contained in:
committed by
Tim Graham
parent
749d23251b
commit
fb48eb0581
@@ -198,7 +198,7 @@ class ForeignKeyTests(test.TestCase):
|
||||
self.assertEqual(warnings, expected_warnings)
|
||||
|
||||
def test_related_name_converted_to_text(self):
|
||||
rel_name = Bar._meta.get_field_by_name('a')[0].rel.related_name
|
||||
rel_name = Bar._meta.get_field('a').rel.related_name
|
||||
self.assertIsInstance(rel_name, six.text_type)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user