summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2013-04-16 13:34:06 -0600
committerCarl Meyer <carl@oddbird.net>2013-04-16 13:34:06 -0600
commita98465c040319b74b697bace11da5b13cc42427f (patch)
treeb856f9a36ed7ebd287830abdc4e20b946874df0f /tests
parent58b3a974fc30c369eabacc747e1763cf04d053fd (diff)
Refs #14567 -- Fixed failing test that wasn't being run.
Diffstat (limited to 'tests')
-rw-r--r--tests/forms_tests/tests/__init__.py2
-rw-r--r--tests/forms_tests/tests/tests.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/forms_tests/tests/__init__.py b/tests/forms_tests/tests/__init__.py
index 3fb537ef41..aea9418c05 100644
--- a/tests/forms_tests/tests/__init__.py
+++ b/tests/forms_tests/tests/__init__.py
@@ -12,7 +12,7 @@ from .test_input_formats import (LocalizedTimeTests, CustomTimeInputFormatsTests
SimpleDateFormatTests, LocalizedDateTimeTests,
CustomDateTimeInputFormatsTests, SimpleDateTimeFormatTests)
from .test_media import FormsMediaTestCase, StaticFormsMediaTestCase
-from .tests import (TestTicket12510, ModelFormCallableModelDefault,
+from .tests import (TestTicket12510, TestTicket14567, ModelFormCallableModelDefault,
FormsModelTestCase, RelatedModelFormTests)
from .test_regressions import FormsRegressionsTestCase
from .test_util import FormsUtilTestCase
diff --git a/tests/forms_tests/tests/tests.py b/tests/forms_tests/tests/tests.py
index be75643b28..80e2cadcc3 100644
--- a/tests/forms_tests/tests/tests.py
+++ b/tests/forms_tests/tests/tests.py
@@ -46,7 +46,8 @@ class TestTicket14567(TestCase):
"""
def test_empty_queryset_return(self):
"If a model's ManyToManyField has blank=True and is saved with no data, a queryset is returned."
- form = OptionalMultiChoiceModelForm({'multi_choice_optional': '', 'multi_choice': ['1']})
+ option = ChoiceOptionModel.objects.create(name='default')
+ form = OptionalMultiChoiceModelForm({'multi_choice_optional': '', 'multi_choice': [option.pk]})
self.assertTrue(form.is_valid())
# Check that the empty value is a QuerySet
self.assertTrue(isinstance(form.cleaned_data['multi_choice_optional'], models.query.QuerySet))