mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #31777 -- Added support for database collations to Char/TextFields.
Thanks Simon Charette and Mariusz Felisiak for reviews.
This commit is contained in:
committed by
Mariusz Felisiak
parent
ba6b32e5ef
commit
e387f191f7
@@ -44,6 +44,16 @@ class TestCharField(TestCase):
|
||||
self.assertEqual(p2.title, Event.C)
|
||||
|
||||
|
||||
class TestMethods(SimpleTestCase):
|
||||
def test_deconstruct(self):
|
||||
field = models.CharField()
|
||||
*_, kwargs = field.deconstruct()
|
||||
self.assertEqual(kwargs, {})
|
||||
field = models.CharField(db_collation='utf8_esperanto_ci')
|
||||
*_, kwargs = field.deconstruct()
|
||||
self.assertEqual(kwargs, {'db_collation': 'utf8_esperanto_ci'})
|
||||
|
||||
|
||||
class ValidationTests(SimpleTestCase):
|
||||
|
||||
class Choices(models.TextChoices):
|
||||
|
||||
Reference in New Issue
Block a user