diff options
Diffstat (limited to 'tests/model_fields/tests.py')
| -rw-r--r-- | tests/model_fields/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index f55175aa9e..bb82c7b93d 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -162,6 +162,12 @@ class GetFieldDisplayTests(SimpleTestCase): self.assertEqual(Whiz(c='').get_c_display(), '') # Empty value self.assertEqual(WhizDelayed(c=0).get_c_display(), 'Other') # Delayed choices + def test_get_FIELD_display_translated(self): + """A translated display value is coerced to str.""" + val = Whiz(c=5).get_c_display() + self.assertIsInstance(val, str) + self.assertEqual(val, 'translated') + def test_iterator_choices(self): """ get_choices() works with Iterators. |
