1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #35436 -- Fixed displaying Unicode chars in forms.HStoreField.

This commit is contained in:
SaJH
2024-05-08 22:41:33 +09:00
committed by Sarah Boyce
parent d59066b90c
commit f92ac845a9
2 changed files with 8 additions and 1 deletions

View File

@@ -410,6 +410,13 @@ class TestFormField(PostgreSQLSimpleTestCase):
form_w_hstore = HStoreFormTest({"f1": '{"a": 2}'}, initial={"f1": {"a": 1}})
self.assertTrue(form_w_hstore.has_changed())
def test_prepare_value(self):
field = forms.HStoreField()
self.assertEqual(
field.prepare_value({"aira_maplayer": "Αρδευτικό δίκτυο"}),
'{"aira_maplayer": "Αρδευτικό δίκτυο"}',
)
class TestValidator(PostgreSQLSimpleTestCase):
def test_simple_valid(self):