summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 5bc0fb3ee1..aaf4f17c75 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -190,12 +190,12 @@ class AdminScriptTestCase(unittest.TestCase):
self.assertIsNotNone(re.search(msg, stream),
"'%s' does not match actual output text '%s'" % (msg, stream))
else:
- self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
+ self.assertIn(msg, stream, "'%s' does not match actual output text '%s'" % (msg, stream))
def assertNotInOutput(self, stream, msg):
"Utility assertion: assert that the given message doesn't exist in the output"
stream = force_text(stream)
- self.assertFalse(msg in stream, "'%s' matches actual output text '%s'" % (msg, stream))
+ self.assertNotIn(msg, stream, "'%s' matches actual output text '%s'" % (msg, stream))
##########################################################################
# DJANGO ADMIN TESTS
@@ -904,7 +904,7 @@ class ManageAlternateSettings(AdminScriptTestCase):
out, err = self.run_manage(args)
expected = ('create table %s'
% connection.ops.quote_name('admin_scripts_article'))
- self.assertTrue(expected.lower() in out.lower())
+ self.assertIn(expected.lower(), out.lower())
self.assertNoOutput(err)
def test_builtin_with_environment(self):
@@ -913,7 +913,7 @@ class ManageAlternateSettings(AdminScriptTestCase):
out, err = self.run_manage(args, 'alternate_settings')
expected = ('create table %s'
% connection.ops.quote_name('admin_scripts_article'))
- self.assertTrue(expected.lower() in out.lower())
+ self.assertIn(expected.lower(), out.lower())
self.assertNoOutput(err)
def test_builtin_with_bad_settings(self):