Ticket #11191: 11191-string-pk-r10837.diff
File 11191-string-pk-r10837.diff, 1.1 KB (added by , 15 years ago) |
---|
-
tests/regressiontests/admin_views/tests.py
63 63 64 64 def testBasicEditGet(self): 65 65 """ 66 A smoke test to ensure GET on the change_view works.66 A smoke test to ensure GET on the change_view works. 67 67 """ 68 68 response = self.client.get('/test_admin/%s/admin_views/section/1/' % self.urlbit) 69 69 self.failUnlessEqual(response.status_code, 200) 70 70 71 def testBasicEditGetStringPK(self): 72 """ 73 A smoke test to ensure GET on the change_view works (returns an HTTP 74 404 error, see #11191) when passing a string as the PK argument for a 75 model with an integer PK field. 76 """ 77 response = self.client.get('/test_admin/%s/admin_views/section/abc/' % self.urlbit) 78 self.failUnlessEqual(response.status_code, 404) 79 71 80 def testBasicAddPost(self): 72 81 """ 73 82 A smoke test to ensure POST on add_view works.