mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 13:30:12 +03:00
Add BaseRenderer test for NotImplementedError
This commit is contained in:
parent
e2c35920d1
commit
9705985868
|
@ -269,6 +269,18 @@ def strip_trailing_whitespace(content):
|
||||||
return re.sub(' +\n', '\n', content)
|
return re.sub(' +\n', '\n', content)
|
||||||
|
|
||||||
|
|
||||||
|
class BaseRendererTests(TestCase):
|
||||||
|
"""
|
||||||
|
Tests BaseRenderer
|
||||||
|
"""
|
||||||
|
def test_render_raise_error(self):
|
||||||
|
"""
|
||||||
|
BaseRenderer.render should raise NotImplementedError
|
||||||
|
"""
|
||||||
|
with self.assertRaises(NotImplementedError):
|
||||||
|
BaseRenderer().render('test')
|
||||||
|
|
||||||
|
|
||||||
class JSONRendererTests(TestCase):
|
class JSONRendererTests(TestCase):
|
||||||
"""
|
"""
|
||||||
Tests specific to the JSON Renderer
|
Tests specific to the JSON Renderer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user