def test_find_wn_nodetemplate_name_error(self): mock_pm = MagicMock(powermanager) powermanager._find_wn_nodetemplate_name(mock_pm, '') self.assertIn( 'Error trying to get the WN template', self.log.getvalue())
def test_find_wn_nodetemplate_name(self): mock_pm = MagicMock(powermanager) template = read_file_as_yaml('test-files/tosca_template.yaml') self.assertEquals( powermanager._find_wn_nodetemplate_name(mock_pm, template), 'torque_wn')