1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #24844 -- Corrected has_changed implementation for HStoreField.

This commit is contained in:
Andrea Grandi
2015-05-24 15:56:48 +01:00
committed by Florian Apolloner
parent 9ef2615d49
commit 43b2d88a5b
3 changed files with 17 additions and 0 deletions

View File

@@ -178,6 +178,12 @@ class TestFormField(PostgresSQLTestCase):
form_field = model_field.formfield()
self.assertIsInstance(form_field, forms.HStoreField)
def test_empty_field_has_not_changed(self):
class HStoreFormTest(forms.Form):
f1 = HStoreField()
form_w_hstore = HStoreFormTest()
self.assertFalse(form_w_hstore.has_changed())
class TestValidator(PostgresSQLTestCase):