def test_render_template_check(self):
        mock_system = Mock()
        mock_system.render_template = None

        with pytest.raises(TypeError):
            MakoModuleDescriptor(mock_system, {})

        del mock_system.render_template

        with pytest.raises(TypeError):
            MakoModuleDescriptor(mock_system, {})
Exemplo n.º 2
0
 def get_context(self):
     _context = MakoModuleDescriptor.get_context(self)
     # Add our specific template information (the raw data body)
     _context.update({'data': self.data})
     return _context
Exemplo n.º 3
0
 def get_context(self):
     _context = MakoModuleDescriptor.get_context(self)
     # Add our specific template information (the raw data body)
     _context.update({'data': self.data})
     return _context