Added a test for a settings error message.

This commit is contained in:
Tim Graham 2018-04-17 12:55:12 -04:00
parent e0a3cfaca0
commit fff689ed98
1 changed files with 2 additions and 1 deletions

View File

@ -234,7 +234,8 @@ class SettingsTests(SimpleTestCase):
settings.TEST = 'test' settings.TEST = 'test'
self.assertEqual('test', settings.TEST) self.assertEqual('test', settings.TEST)
del settings.TEST del settings.TEST
with self.assertRaises(AttributeError): msg = "'Settings' object has no attribute 'TEST'"
with self.assertRaisesMessage(AttributeError, msg):
getattr(settings, 'TEST') getattr(settings, 'TEST')
def test_settings_delete_wrapped(self): def test_settings_delete_wrapped(self):