summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-08-14 14:38:23 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-08-14 14:38:23 +0200
commitd6b8b125fbd370bb575c43ba66270e22de919a51 (patch)
tree35c90660548d78b864cda51aebf8d2bf839ec8af
parent0c198b85a3292cb7f2f2cd1b2d6dc6f04a1ed831 (diff)
[py3] Fixed admin_custom_urls tests.
-rw-r--r--tests/regressiontests/admin_custom_urls/models.py2
-rw-r--r--tests/regressiontests/admin_custom_urls/tests.py5
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/regressiontests/admin_custom_urls/models.py b/tests/regressiontests/admin_custom_urls/models.py
index 4bc9ce561e..a5b4983b09 100644
--- a/tests/regressiontests/admin_custom_urls/models.py
+++ b/tests/regressiontests/admin_custom_urls/models.py
@@ -28,7 +28,7 @@ class ActionAdmin(admin.ModelAdmin):
Remove all entries named 'name' from the ModelAdmin instance URL
patterns list
"""
- return filter(lambda e: e.name != name, super(ActionAdmin, self).get_urls())
+ return [url for url in super(ActionAdmin, self).get_urls() if url.name != name]
def get_urls(self):
# Add the URL of our custom 'add_view' view to the front of the URLs
diff --git a/tests/regressiontests/admin_custom_urls/tests.py b/tests/regressiontests/admin_custom_urls/tests.py
index 4a6235e7d5..459f67c521 100644
--- a/tests/regressiontests/admin_custom_urls/tests.py
+++ b/tests/regressiontests/admin_custom_urls/tests.py
@@ -29,10 +29,7 @@ class AdminCustomUrlsTest(TestCase):
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):
"""