Skip to content

Commit 03c7f14

Browse files
committed
Test case for settings check
1 parent 13c66b9 commit 03c7f14

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_settings.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ def test_import_error_message_maintained(self):
1818
with self.assertRaises(ImportError):
1919
settings.DEFAULT_RENDERER_CLASSES
2020

21+
def test_loud_error_raised_on_removed_setting(self):
22+
"""
23+
Make sure user is alerted with an error when a removed setting
24+
is set.
25+
"""
26+
with self.asserRaise(AttributeError):
27+
APISettings({
28+
'MAX_PAGINATE_BY': 100
29+
})
30+
2131

2232
class TestSettingTypes(TestCase):
2333
def test_settings_consistently_coerced_to_list(self):

0 commit comments

Comments
 (0)