diff options
| author | Tim Graham <timograham@gmail.com> | 2016-07-25 14:04:39 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-07-27 08:14:14 -0400 |
| commit | a5f85d891b51d7ceb4f9e422e3e4f5c741062288 (patch) | |
| tree | c12b7c8bb54fbb373105a0bd8e263ced612b0edf /tests/postgres_tests | |
| parent | 0d1218896f3dcd9a37d44c123d936e5fe8cea416 (diff) | |
Fixed #26917 -- Fixed crash in disabled ModelChoiceFields.
Partially reverted refs #25532 to fix a regression in Django 1.10.
This reintroduces a crash for disabled forms.JSONField (refs #26949),
however, that issue is also present on Django 1.9.
Thanks Ryan Schave for the test.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_json.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/postgres_tests/test_json.py b/tests/postgres_tests/test_json.py index b88d103761..0165cabfd9 100644 --- a/tests/postgres_tests/test_json.py +++ b/tests/postgres_tests/test_json.py @@ -260,14 +260,6 @@ class TestFormField(PostgreSQLTestCase): form_field = model_field.formfield() self.assertIsInstance(form_field, forms.JSONField) - def test_formfield_disabled(self): - class JsonForm(Form): - name = CharField() - jfield = forms.JSONField(disabled=True) - - form = JsonForm({'name': 'xyz', 'jfield': '["bar"]'}, initial={'jfield': ['foo']}) - self.assertIn('["foo"]</textarea>', form.as_p()) - def test_prepare_value(self): field = forms.JSONField() self.assertEqual(field.prepare_value({'a': 'b'}), '{"a": "b"}') |
