Author: jacob Date: 2010-01-16 16:45:39 -0600 (Sat, 16 Jan 2010) New Revision: 12232
Modified: django/trunk/tests/regressiontests/forms/models.py Log: Fixed a form test from [12211] that didn't clean up after itself. Thanks, Alex Gaynor. Modified: django/trunk/tests/regressiontests/forms/models.py =================================================================== --- django/trunk/tests/regressiontests/forms/models.py 2010-01-16 13:34:19 UTC (rev 12231) +++ django/trunk/tests/regressiontests/forms/models.py 2010-01-16 22:45:39 UTC (rev 12232) @@ -61,10 +61,11 @@ 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': """
-- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.