def test_dublicate_key_exception(): yaml_file = StringIO(YAML_WITH_EXCEPTION) with pytest.raises(DuplicateKeyError): parser = YamlParser.parser_from_buffer(yaml_file) parser.parse()
def test_parse_yaml_example(self): file_example = StringIO(YAML_EXAMPLE) parser = YamlParser.parser_from_buffer(file_example) migration = parser.parse() self.assertEqual(len(migration.versions), 4)
def test_parse_yaml_example(): file_example = StringIO(YAML_EXAMPLE) parser = YamlParser.parser_from_buffer(file_example) migration = parser.parse() assert len(migration.versions) == 4