diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-04-29 14:25:06 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-04-29 14:25:06 +0200 |
| commit | 9350d1d59c1a4e6a9ac246a808f55da35de0df69 (patch) | |
| tree | 2367f60021798b89ceef176705514ef2a7a1cd5a /tests | |
| parent | 02a5b41db4ff8544f93a5d9854b346a9aae4f556 (diff) | |
Fixed #17976 -- Made forms.BooleanField pickleable.
This was a regression in Django 1.4.
Thanks bronger for the report and claudep for the patch.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/forms/tests/fields.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py index 9474fcb686..3c91cdc41e 100644 --- a/tests/regressiontests/forms/tests/fields.py +++ b/tests/regressiontests/forms/tests/fields.py @@ -25,6 +25,7 @@ Other than that, the Field subclasses have class-specific options for __init__(). For example, CharField has a max_length option. """ import datetime +import pickle import re import os import warnings @@ -690,6 +691,9 @@ class FieldsTests(SimpleTestCase): self.assertEqual(False, f.clean('false')) self.assertEqual(False, f.clean('FaLsE')) + def test_boolean_picklable(self): + self.assertIsInstance(pickle.loads(pickle.dumps(BooleanField())), BooleanField) + # ChoiceField ################################################################# def test_choicefield_1(self): |
