def mock_get_yaml(yaml_file): if 'main' in yaml_file: return base.get_main_yaml() elif 'test_keystone' in yaml_file: return base.get_test_keystone_soochi() elif 'test_glance' in yaml_file: return base.get_test_glance_soochi()
def get_yaml_file(location): if 'main' in location: t_soochis = base.get_main_yaml() t_soochis['monitor']['groups'] = ['test_group'] return t_soochis return self.mock_get_yaml(location)
def get_yaml_file(location): if 'main' in location: t_soochis = base.get_main_yaml() del t_soochis['monitor']['soochis']['test_keystone'] del t_soochis['deployment']['soochis']['test_glance'] return t_soochis return self.mock_get_yaml(location)
def get_yaml_file(location): if 'main' in location: t_soochis = base.get_main_yaml() t_soochis['monitor']['soochis']['test_soochi'] = { 'soochi': 'test_soochi'} return t_soochis return self.mock_get_yaml(location)
def test_format_main_dict(self): dct = base.get_main_yaml() self.assertEqual(dct, dummy.FormatOutputConsole().format_output(**dct))