diff options
| author | Tim Graham <timograham@gmail.com> | 2015-08-07 13:06:56 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-07 13:26:17 -0400 |
| commit | a7b7f27c05244d69a11545261eb3bbd73791b3d2 (patch) | |
| tree | 1b01f614e38d0437fd39303c133a2a0c3d41661b /tests | |
| parent | 6ed613b2a52f8719b92b94d815e9f997d262412c (diff) | |
Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
Diffstat (limited to '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 81ee02dafa..68c54918a1 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -206,6 +206,12 @@ class TestFormField(PostgreSQLTestCase): 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(PostgreSQLTestCase): |
