Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a form test from [12211] that didn't clean up after itself. Tha…

…nks, Alex Gaynor.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5bc344cecaec2bf9fb027048226a41127d49add1 1 parent 2e9518b
Jacob Kaplan-Moss jacobian authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/regressiontests/forms/
3  tests/regressiontests/forms/
@@ -61,10 +61,11 @@ def tearDown(self):
settings.DEBUG = self.old_debug
def test_choices_not_fetched_when_not_rendering(self):
+ initial_queries = len(connection.queries)
field = django_forms.ModelChoiceField(Group.objects.order_by('-name'))
self.assertEqual('a', field.clean(self.groups[0].pk).name)
# only one query is required to pull the model from DB
- self.assertEqual(1, len(connection.queries))
+ self.assertEqual(initial_queries+1, len(connection.queries))
__test__ = {'API_TESTS': """
Please sign in to comment.
Something went wrong with that request. Please try again.