From 43b2d88a5b9cfb151ccf7ac861f2750e70c0e2c4 Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Sun, 24 May 2015 15:56:48 +0100 Subject: Fixed #24844 -- Corrected has_changed implementation for HStoreField. --- tests/postgres_tests/test_hstore.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py index e63eda46b9..9569711b3d 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -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): -- cgit v1.3