Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3] Fixed admin_custom_urls tests.

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

0 notes on commit d6b8b12

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