def test_invalid_yaml(): with wrap() as wrapper: parser = YamlFileParser() parser.wrapper = wrapper try: parser.parse(INVALID_YAML) assert False, "should raise UserFeedback" except dexy.exceptions.UserFeedback as e: assert 'YAML' in e.message
def test_yaml_parser(): with wrap() as wrapper: parser = YamlFileParser() parser.wrapper = wrapper parser.parse(YAML) docs = wrapper.docs for doc in docs: assert doc.__class__.__name__ == 'BundleDoc' assert doc.key in ['code', 'wordpress']