diff --git a/tests/modeltests/model_formsets/tests.py b/tests/modeltests/model_formsets/tests.py index 23e8a0c01e..a45b44375f 100644 --- a/tests/modeltests/model_formsets/tests.py +++ b/tests/modeltests/model_formsets/tests.py @@ -9,7 +9,7 @@ class DeletionTests(TestCase): data = { 'form-TOTAL_FORMS': u'1', 'form-INITIAL_FORMS': u'1', - 'form-0-id': u'1', + 'form-0-id': str(poet.pk), 'form-0-name': u'test', 'form-0-DELETE': u'on', } diff --git a/tests/regressiontests/inline_formsets/tests.py b/tests/regressiontests/inline_formsets/tests.py index 5cd5209b25..f1527ac3c3 100644 --- a/tests/regressiontests/inline_formsets/tests.py +++ b/tests/regressiontests/inline_formsets/tests.py @@ -6,12 +6,12 @@ class DeletionTests(TestCase): def test_deletion(self): PoemFormSet = inlineformset_factory(Poet, Poem, can_delete=True) poet = Poet.objects.create(name='test') - poet.poem_set.create(name='test poem') + poem = poet.poem_set.create(name='test poem') data = { 'poem_set-TOTAL_FORMS': u'1', 'poem_set-INITIAL_FORMS': u'1', - 'poem_set-0-id': u'1', - 'poem_set-0-poem': u'1', + 'poem_set-0-id': str(poem.pk), + 'poem_set-0-poet': str(poet.pk), 'poem_set-0-name': u'test', 'poem_set-0-DELETE': u'on', }