Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use failIf() instead of assertFalse() so that tests work with python …

…2.3.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4881a4ffb04bf8a63a604525976ea555772fe38d 1 parent 01dd602
@malcolmt malcolmt authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/regressiontests/admin_views/tests.py
View
8 tests/regressiontests/admin_views/tests.py
@@ -500,7 +500,7 @@ def test_staff_member_required_decorator_works_as_per_admin_login(self):
self.failUnlessEqual(request.status_code, 200)
login = self.client.post('/test_admin/admin/secure-view/', self.super_login)
self.assertRedirects(login, '/test_admin/admin/secure-view/')
- self.assertFalse(login.context)
+ self.failIf(login.context)
self.client.get('/test_admin/admin/logout/')
# Test if user enters e-mail address
@@ -522,7 +522,7 @@ def test_staff_member_required_decorator_works_as_per_admin_login(self):
self.failUnlessEqual(request.status_code, 200)
login = self.client.post('/test_admin/admin/secure-view/', self.adduser_login)
self.assertRedirects(login, '/test_admin/admin/secure-view/')
- self.assertFalse(login.context)
+ self.failIf(login.context)
self.client.get('/test_admin/admin/logout/')
# Change User
@@ -530,7 +530,7 @@ def test_staff_member_required_decorator_works_as_per_admin_login(self):
self.failUnlessEqual(request.status_code, 200)
login = self.client.post('/test_admin/admin/secure-view/', self.changeuser_login)
self.assertRedirects(login, '/test_admin/admin/secure-view/')
- self.assertFalse(login.context)
+ self.failIf(login.context)
self.client.get('/test_admin/admin/logout/')
# Delete User
@@ -538,7 +538,7 @@ def test_staff_member_required_decorator_works_as_per_admin_login(self):
self.failUnlessEqual(request.status_code, 200)
login = self.client.post('/test_admin/admin/secure-view/', self.deleteuser_login)
self.assertRedirects(login, '/test_admin/admin/secure-view/')
- self.assertFalse(login.context)
+ self.failIf(login.context)
self.client.get('/test_admin/admin/logout/')
# Regular User should not be able to login.
Please sign in to comment.
Something went wrong with that request. Please try again.