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, {})
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