diff options
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_hstore.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py index 8b2cc883dc..b36333d90c 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -4,6 +4,7 @@ from django.contrib.postgres import forms from django.contrib.postgres.fields import HStoreField from django.contrib.postgres.validators import KeysValidator from django.core import exceptions, serializers +from django.forms import Form from django.test import TestCase from .models import HStoreModel @@ -174,6 +175,12 @@ class TestFormField(TestCase): form_field = model_field.formfield() self.assertIsInstance(form_field, forms.HStoreField) + def test_empty_field_has_not_changed(self): + class HStoreFormTest(Form): + f1 = HStoreField() + form_w_hstore = HStoreFormTest() + self.assertFalse(form_w_hstore.has_changed()) + class TestValidator(TestCase): |
