mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24677 -- Made TextField.to_python() return a string.
This is consistent with CharField.
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user