def test_yaml_to_ordered_dict(self): raw_config = """ pre_build: hook2: path: foo.bar hook1: path: foo1.bar1 """ config = yaml_to_ordered_dict(raw_config) self.assertEqual(config['pre_build'].keys()[0], 'hook2') self.assertEqual(config['pre_build']['hook2']['path'], 'foo.bar')
def test_yaml_to_ordered_dict(self): raw_config = """ pre_build: hook2: path: foo.bar hook1: path: foo1.bar1 """ config = yaml_to_ordered_dict(raw_config) self.assertEqual(list(config['pre_build'].keys())[0], 'hook2') self.assertEqual(config['pre_build']['hook2']['path'], 'foo.bar')