Corrected a test failure under Postgres caused by PK allocation. Thanks to Alex for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-01-04 05:57:32 +00:00
parent c0dd2babb1
commit 39b3269fec
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ class CreateViewTests(TestCase):
res = self.client.post('/edit/artists/create/',
{'name': 'Rene Magritte'})
self.assertEqual(res.status_code, 302)
self.assertRedirects(res, 'http://testserver/detail/artist/1/')
artist = Artist.objects.get(name='Rene Magritte')
self.assertRedirects(res, 'http://testserver/detail/artist/%d/' % artist.pk)
self.assertQuerysetEqual(Artist.objects.all(), ['<Artist: Rene Magritte>'])
def test_create_with_redirect(self):