Exemple #1
0
def test_dublicate_key_exception():
    yaml_file = StringIO(YAML_WITH_EXCEPTION)
    with pytest.raises(DuplicateKeyError):
        parser = YamlParser.parser_from_buffer(yaml_file)
        parser.parse()
Exemple #2
0
 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)
Exemple #3
0
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