diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2010-01-16 22:45:39 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2010-01-16 22:45:39 +0000 |
| commit | 5bc344cecaec2bf9fb027048226a41127d49add1 (patch) | |
| tree | 49584fe27c217d1caaa2b01fc4801d9e5202565b /tests/regressiontests/forms/models.py | |
| parent | 2e9518bb396c37c48a0464236b714d313b56f10f (diff) | |
Fixed a form test from [12211] that didn't clean up after itself. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/models.py')
| -rw-r--r-- | tests/regressiontests/forms/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/regressiontests/forms/models.py b/tests/regressiontests/forms/models.py index de91ec67e7..2127d40d95 100644 --- a/tests/regressiontests/forms/models.py +++ b/tests/regressiontests/forms/models.py @@ -61,10 +61,11 @@ class TestTicket12510(TestCase): 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': """ |
