diff options
| author | Rolo <rolo@wildfish.com> | 2015-06-04 11:24:53 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-04 09:02:54 -0400 |
| commit | 19e67c6cd13d6442abb2a6eba1b7fba80dcf5457 (patch) | |
| tree | 13b4d9df48887ac90b09835d5b0f62c60efb3557 /tests/model_fields | |
| parent | dfdcb3ca226023c4166c69abccc7f627ea69aa80 (diff) | |
Fixed #24677 -- Made TextField.to_python() return a string.
This is consistent with CharField.
Diffstat (limited to 'tests/model_fields')
| -rw-r--r-- | tests/model_fields/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py index 3e59f6465b..939ba269d8 100644 --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -246,6 +246,13 @@ class ManyToManyFieldTests(test.SimpleTestCase): ) +class TextFieldTests(test.TestCase): + def test_to_python(self): + """TextField.to_python() should return a string""" + f = models.TextField() + self.assertEqual(f.to_python(1), '1') + + class DateTimeFieldTests(test.TestCase): def test_datetimefield_to_python_usecs(self): """DateTimeField.to_python should support usecs""" |
