diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py
index 128672b93b..417b69cfdd 100644
--- a/cms/djangoapps/contentstore/tests/tests.py
+++ b/cms/djangoapps/contentstore/tests/tests.py
@@ -319,7 +319,7 @@ class AuthTestCase(ContentStoreTestCase):
is turned off
"""
response = self.client.get(reverse('homepage'))
- self.assertNotIn('Sign Up', response.content)
+ self.assertNotContains(response, 'Sign Up')
@mock.patch.dict(settings.FEATURES, {"ALLOW_PUBLIC_ACCOUNT_CREATION": False})
def test_signup_button_login_page(self):
@@ -328,7 +328,7 @@ class AuthTestCase(ContentStoreTestCase):
is turned off
"""
response = self.client.get(reverse('login'))
- self.assertNotIn('Sign Up', response.content)
+ self.assertNotContains(response, 'Sign Up')
@mock.patch.dict(settings.FEATURES, {"ALLOW_PUBLIC_ACCOUNT_CREATION": False})
def test_signup_link_login_page(self):
diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py
index 2b5812388f..6495bcb4c8 100644
--- a/lms/djangoapps/branding/tests/test_page.py
+++ b/lms/djangoapps/branding/tests/test_page.py
@@ -202,15 +202,15 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
# assert that the course discovery UI is not present
- self.assertNotIn('Search for a course', response.content)
+ self.assertNotContains(response, 'Search for a course')
# check the /courses view
response = self.client.get(reverse('courses'))
self.assertEqual(response.status_code, 200)
# assert that the course discovery UI is not present
- self.assertNotIn('Search for a course', response.content)
- self.assertNotIn('