diff --git a/common/djangoapps/student/tests/test_events.py b/common/djangoapps/student/tests/test_events.py index ea822c98e9..158dd4b7dc 100644 --- a/common/djangoapps/student/tests/test_events.py +++ b/common/djangoapps/student/tests/test_events.py @@ -36,7 +36,7 @@ class TestUserProfileEvents(UserSettingsEventTestMixin, TestCase): # Verify that we remove the temporary `_changed_fields` property from # the model after we're done emitting events. with self.assertRaises(AttributeError): - getattr(self.profile, '_changed_fields') + self.profile._changed_fields # pylint: disable=pointless-statement, protected-access def test_change_many_fields(self): """ diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index e7e1f1fd8a..bcbbea44ac 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -196,8 +196,8 @@ class TestECommerceDashboardViews(SharedModuleStoreTestCase): data['code'] = 'Vs23Ws4j' response = self.client.post(add_coupon_url, data) - self.assertTrue("The code ({code}) that you have tried to define is already in use as a registration code" - .format(code=data['code']) in response.content) + msg = "The code ({code}) that you have tried to define is already in use as a registration code" + self.assertIn(msg.format(code=data['code']), response.content) def test_delete_coupon(self): """