1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Converted more test assertions to assert[Not]Contains.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Claude Paroz
2012-04-14 13:35:25 +00:00
parent 749243941c
commit 0e01023897
6 changed files with 42 additions and 64 deletions

View File

@@ -131,8 +131,8 @@ class AdminFormfieldForDBFieldWithRequestTests(DjangoTestCase):
"""
self.client.login(username="super", password="secret")
response = self.client.get("/widget_admin/admin_widgets/cartire/add/")
self.assertTrue("BMW M3" not in response.content)
self.assertTrue("Volkswagon Passat" in response.content)
self.assertNotContains(response, "BMW M3")
self.assertContains(response, "Volkswagon Passat")
class AdminForeignKeyWidgetChangeList(DjangoTestCase):
@@ -147,7 +147,7 @@ class AdminForeignKeyWidgetChangeList(DjangoTestCase):
def test_changelist_foreignkey(self):
response = self.client.get('%s/admin_widgets/car/' % self.admin_root)
self.assertTrue('%s/auth/user/add/' % self.admin_root in response.content)
self.assertContains(response, '%s/auth/user/add/' % self.admin_root)
class AdminForeignKeyRawIdWidget(DjangoTestCase):