Fix literal-used-as-attribute error
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user