Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[py3] Fixed admin_custom_urls tests.

  • Loading branch information...
commit d6b8b125fbd370bb575c43ba66270e22de919a51 1 parent 0c198b8
@aaugustin aaugustin authored
2  tests/regressiontests/admin_custom_urls/
@@ -28,7 +28,7 @@ def remove_url(self, name):
Remove all entries named 'name' from the ModelAdmin instance URL
patterns list
- return filter(lambda e: != name, super(ActionAdmin, self).get_urls())
+ return [url for url in super(ActionAdmin, self).get_urls() if != name]
def get_urls(self):
# Add the URL of our custom 'add_view' view to the front of the URLs
5 tests/regressiontests/admin_custom_urls/
@@ -29,10 +29,7 @@ def testBasicAddGet(self):
def testAddWithGETArgs(self):
response = self.client.get('/custom_urls/admin/admin_custom_urls/action/!add/', {'name': 'My Action'})
self.assertEqual(response.status_code, 200)
- self.assertTrue(
- 'value="My Action"' in response.content,
- "Couldn't find an input with the right value in the response."
- )
+ self.assertContains(response, 'value="My Action"')
def testBasicAddPost(self):

0 comments on commit d6b8b12

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