Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit a98465c040319b74b697bace11da5b13cc42427f 1 parent 58b3a97
Carl Meyer authored April 16, 2013
2  tests/forms_tests/tests/__init__.py
@@ -12,7 +12,7 @@
12 12
     SimpleDateFormatTests, LocalizedDateTimeTests,
13 13
     CustomDateTimeInputFormatsTests, SimpleDateTimeFormatTests)
14 14
 from .test_media import FormsMediaTestCase, StaticFormsMediaTestCase
15  
-from .tests import (TestTicket12510, ModelFormCallableModelDefault,
  15
+from .tests import (TestTicket12510, TestTicket14567, ModelFormCallableModelDefault,
16 16
     FormsModelTestCase, RelatedModelFormTests)
17 17
 from .test_regressions import FormsRegressionsTestCase
18 18
 from .test_util import FormsUtilTestCase
3  tests/forms_tests/tests/tests.py
@@ -46,7 +46,8 @@ class TestTicket14567(TestCase):
46 46
     """
47 47
     def test_empty_queryset_return(self):
48 48
         "If a model's ManyToManyField has blank=True and is saved with no data, a queryset is returned."
49  
-        form = OptionalMultiChoiceModelForm({'multi_choice_optional': '', 'multi_choice': ['1']})
  49
+        option = ChoiceOptionModel.objects.create(name='default')
  50
+        form = OptionalMultiChoiceModelForm({'multi_choice_optional': '', 'multi_choice': [option.pk]})
50 51
         self.assertTrue(form.is_valid())
51 52
         # Check that the empty value is a QuerySet
52 53
         self.assertTrue(isinstance(form.cleaned_data['multi_choice_optional'], models.query.QuerySet))

0 notes on commit a98465c

Jeremy Dunck

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

Carl Meyer

@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.

Please sign in to comment.
Something went wrong with that request. Please try again.