def test_catsup_meta_parser(): meta_txt = """ # Hello, world! - tags: hello, world """ lines = [l.strip() for l in meta_txt.splitlines() if l] meta = parse_catsup_meta(lines) assert meta.title == "Hello, world!" assert meta.tags == "hello, world"
def test_catsup_meta_parser_error_2(): parse_catsup_meta(["#fsdaf-,-,-,-", "fdsa- 0,"])