diff --git a/tests/regressiontests/model_formsets_regress/tests.py b/tests/regressiontests/model_formsets_regress/tests.py
index f1e935e..7d013bd 100644
a
|
b
|
|
1 | 1 | from __future__ import absolute_import |
2 | 2 | |
3 | 3 | from django import forms |
| 4 | from django.db import connection |
4 | 5 | from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME |
5 | 6 | from django.forms.util import ErrorDict, ErrorList |
6 | 7 | from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet |
… |
… |
class FormsetTests(TestCase):
|
255 | 256 | u'test-INITIAL_FORMS': u'0', |
256 | 257 | u'test-MAX_NUM_FORMS': u'', |
257 | 258 | u'test-0-name': u'Random Place', } |
258 | | with self.assertNumQueries(1): |
| 259 | expected_num_queries = 1 |
| 260 | if not connection.features.can_return_id_from_insert: |
| 261 | expected_num_queries = 2 |
| 262 | with self.assertNumQueries(expected_num_queries): |
259 | 263 | formset = Formset(data, prefix="test") |
260 | 264 | formset.save() |
261 | 265 | |