Fix literal-used-as-attribute error

This commit is contained in:
Ned Batchelder
2016-07-31 09:02:50 -04:00
parent 9e6a63b68e
commit ef4c69881c
2 changed files with 3 additions and 3 deletions

View File

@@ -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):
"""

View File

@@ -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):
"""