Browse files

Refs #14567 -- Fixed failing test that wasn't being run.

  • Loading branch information...
1 parent 58b3a97 commit a98465c040319b74b697bace11da5b13cc42427f @carljm carljm committed Apr 16, 2013
Showing with 3 additions and 2 deletions.
  1. +1 −1 tests/forms_tests/tests/
  2. +2 −1 tests/forms_tests/tests/
@@ -12,7 +12,7 @@
SimpleDateFormatTests, LocalizedDateTimeTests,
CustomDateTimeInputFormatsTests, SimpleDateTimeFormatTests)
from .test_media import FormsMediaTestCase, StaticFormsMediaTestCase
-from .tests import (TestTicket12510, ModelFormCallableModelDefault,
+from .tests import (TestTicket12510, TestTicket14567, ModelFormCallableModelDefault,

jdunck Apr 22, 2013


Perhaps this would be a good place to use "from .tests import *"? What else aren't we running? :/


carljm Apr 22, 2013


@prestontimmons found this failing test in his (awesome!) work on the test-discovery branch. I think there may be a few other tests that the discovery branch is finding that our current runner doesn't, but this was the only one that was failing. In any case, I'm not too concerned about tracking them all down and adding imports for them in master, since in the discovery branch all these imports go away anyway.

FormsModelTestCase, RelatedModelFormTests)
from .test_regressions import FormsRegressionsTestCase
from .test_util import FormsUtilTestCase
@@ -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': []})
# Check that the empty value is a QuerySet
self.assertTrue(isinstance(form.cleaned_data['multi_choice_optional'], models.query.QuerySet))

0 comments on commit a98465c

Please sign in to comment.