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:
parent
c0dd2babb1
commit
39b3269fec
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue