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

[1.2.X] Removed all usages of deprecated TestCase methods (self.fail*). This removed most of the Warnings emitted (with -Wall) during the test suite. Backport of [14803].

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2010-12-04 07:49:31 +00:00
parent 5a792ec4cc
commit cc48f66f73
27 changed files with 403 additions and 388 deletions

View File

@@ -12,6 +12,7 @@ import re
from django import conf, bin, get_version
from django.conf import settings
class AdminScriptTestCase(unittest.TestCase):
def write_settings(self, filename, apps=None, is_dir=False, sdict=None):
test_dir = os.path.dirname(os.path.dirname(__file__))
@@ -156,7 +157,7 @@ class AdminScriptTestCase(unittest.TestCase):
self.assertEquals(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
def assertOutput(self, stream, msg):
"Utility assertion: assert that the given message exists in the output"
self.failUnless(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
##########################################################################
# DJANGO ADMIN TESTS