From 03c7f149ac0162a78892593d33b5866a1a9b72df Mon Sep 17 00:00:00 2001 From: Luis San Pablo Date: Mon, 7 Dec 2015 22:17:33 -0600 Subject: [PATCH] Test case for settings check --- tests/test_settings.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_settings.py b/tests/test_settings.py index cc8d0d51f..5240a3f9b 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -18,6 +18,16 @@ class TestSettings(TestCase): with self.assertRaises(ImportError): settings.DEFAULT_RENDERER_CLASSES + def test_loud_error_raised_on_removed_setting(self): + """ + Make sure user is alerted with an error when a removed setting + is set. + """ + with self.asserRaise(AttributeError): + APISettings({ + 'MAX_PAGINATE_BY': 100 + }) + class TestSettingTypes(TestCase): def test_settings_consistently_coerced_to_list(self):