mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #23455 -- Accept either bytes or text for related_name, convert to text.
This commit is contained in:
@@ -199,6 +199,10 @@ class ForeignKeyTests(test.TestCase):
|
||||
warnings = checks.run_checks()
|
||||
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
|
||||
self.assertIsInstance(rel_name, six.text_type)
|
||||
|
||||
|
||||
class DateTimeFieldTests(unittest.TestCase):
|
||||
def test_datetimefield_to_python_usecs(self):
|
||||
|
||||
Reference in New Issue
Block a user