mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Test case for settings check
This commit is contained in:
parent
13c66b9dfe
commit
03c7f149ac
|
@ -18,6 +18,16 @@ class TestSettings(TestCase):
|
||||||
with self.assertRaises(ImportError):
|
with self.assertRaises(ImportError):
|
||||||
settings.DEFAULT_RENDERER_CLASSES
|
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):
|
class TestSettingTypes(TestCase):
|
||||||
def test_settings_consistently_coerced_to_list(self):
|
def test_settings_consistently_coerced_to_list(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user