예제 #1
0
 def test_renderer_negotiation_not_implemented(self):
     renderer = renderers.BaseRenderer()
     with self.assertRaises(NotImplementedError) as context:
         renderer.render(None, None)
     msg = str(context.exception)
     expected = '`render()` method must be implemented for class "BaseRenderer"'
     self.assertEqual(msg, expected)
예제 #2
0
 def test_renderer_negotiation_not_implemented(self):
     renderer = renderers.BaseRenderer()
     with pytest.raises(NotImplementedError) as exception:
         renderer.render(None, None)
     msg = str(exception.value)
     expected = '`render()` method must be implemented for class "BaseRenderer"'
     assert msg == expected