From fff689ed982c9aeb1402446c4eb91c2fb5a2c832 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 17 Apr 2018 12:55:12 -0400 Subject: [PATCH] Added a test for a settings error message. --- tests/settings_tests/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index 5a618954ed..09c062c897 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -234,7 +234,8 @@ class SettingsTests(SimpleTestCase): settings.TEST = 'test' self.assertEqual('test', settings.TEST) del settings.TEST - with self.assertRaises(AttributeError): + msg = "'Settings' object has no attribute 'TEST'" + with self.assertRaisesMessage(AttributeError, msg): getattr(settings, 'TEST') def test_settings_delete_wrapped(self):