Commit ef4c6988 by Ned Batchelder

Fix literal-used-as-attribute error

parent 9e6a63b6
......@@ -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):
"""
......
......@@ -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):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment