diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-04-14 13:35:25 +0000 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-04-14 13:35:25 +0000 |
| commit | 0e0102389787444f3981aea19867a9dad6a4999b (patch) | |
| tree | dd3a35d6d17b77366624a7d4f0b0e56113d21490 /tests/regressiontests/admin_widgets/tests.py | |
| parent | 749243941c0761a9dbf7afd5ef0fe1769a6647cd (diff) | |
Converted more test assertions to assert[Not]Contains.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_widgets/tests.py')
| -rw-r--r-- | tests/regressiontests/admin_widgets/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/regressiontests/admin_widgets/tests.py b/tests/regressiontests/admin_widgets/tests.py index c1116ba35a..dd53256b05 100644 --- a/tests/regressiontests/admin_widgets/tests.py +++ b/tests/regressiontests/admin_widgets/tests.py @@ -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): |
