Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some silly assumptions about pk's that broke the test suite und…

…er postgresql.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit dc832d7753a0c65db5eca5ce0b2d046bd0d299e8 1 parent b2645a1
Joseph Kocherhans authored April 01, 2009
2  tests/modeltests/model_formsets/tests.py
@@ -9,7 +9,7 @@ def test_deletion(self):
9 9
         data = {
10 10
             'form-TOTAL_FORMS': u'1',
11 11
             'form-INITIAL_FORMS': u'1',
12  
-            'form-0-id': u'1',
  12
+            'form-0-id': str(poet.pk),
13 13
             'form-0-name': u'test',
14 14
             'form-0-DELETE': u'on',
15 15
         }
6  tests/regressiontests/inline_formsets/tests.py
@@ -6,12 +6,12 @@ class DeletionTests(TestCase):
6 6
     def test_deletion(self):
7 7
         PoemFormSet = inlineformset_factory(Poet, Poem, can_delete=True)
8 8
         poet = Poet.objects.create(name='test')
9  
-        poet.poem_set.create(name='test poem')
  9
+        poem = poet.poem_set.create(name='test poem')
10 10
         data = {
11 11
             'poem_set-TOTAL_FORMS': u'1',
12 12
             'poem_set-INITIAL_FORMS': u'1',
13  
-            'poem_set-0-id': u'1',
14  
-            'poem_set-0-poem': u'1',
  13
+            'poem_set-0-id': str(poem.pk),
  14
+            'poem_set-0-poet': str(poet.pk),
15 15
             'poem_set-0-name': u'test',
16 16
             'poem_set-0-DELETE': u'on',
17 17
         }

0 notes on commit dc832d7

Please sign in to comment.
Something went wrong with that request. Please try again.