diff options
| author | Tim Graham <timograham@gmail.com> | 2015-08-07 13:06:56 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-07 14:31:05 -0400 |
| commit | ad2ac53054f1deea6818d05220db73f6c09c1702 (patch) | |
| tree | a2902d1a42e33a7cb96adba2dffc812b692cd2c8 /tests/postgres_tests | |
| parent | a7fb311aced5469dbf2588d860579be87b67e3d9 (diff) | |
[1.8.x] Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
Backport of a7b7f27c05244d69a11545261eb3bbd73791b3d2 from master
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_hstore.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py index aa34773d1e..f5e6f416ad 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -196,6 +196,12 @@ class TestFormField(TestCase): form_w_hstore = HStoreFormTest({'f1': '{"a": 2}'}, initial={'f1': '{"a": 1}'}) self.assertTrue(form_w_hstore.has_changed()) + form_w_hstore = HStoreFormTest({'f1': '{"a": 1}'}, initial={'f1': {"a": 1}}) + self.assertFalse(form_w_hstore.has_changed()) + + form_w_hstore = HStoreFormTest({'f1': '{"a": 2}'}, initial={'f1': {"a": 1}}) + self.assertTrue(form_w_hstore.has_changed()) + class TestValidator(TestCase): |
