blob: f2ff4ca14cb06e43b0497782149cae20080cf2e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from __future__ import unicode_literals
from django.test import TestCase
from rest_framework.settings import APISettings
class TestSettings(TestCase):
def test_import_error_message_maintained(self):
"""
Make sure import errors are captured and raised sensibly.
"""
settings = APISettings({
'DEFAULT_RENDERER_CLASSES': [
'tests.invalid_module.InvalidClassName'
]
})
with self.assertRaises(ImportError):
settings.DEFAULT_RENDERER_CLASSES
|