Add BaseRenderer test for NotImplementedError

This commit is contained in:
Artem Muterko 2017-01-07 13:15:51 +02:00
parent e2c35920d1
commit 9705985868

View File

@ -269,6 +269,18 @@ def strip_trailing_whitespace(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):
"""
Tests specific to the JSON Renderer