def test_init(self): body = RecordBody(( RecordSection("removed", "- removed"), RecordSection("added", "- added"), RecordSection("added", "- added2\n"), )) assert body.render( ) == "### Added\n- added\n- added2\n\n### Removed\n- removed"
def test_clear(self): body = RecordBody([RecordSection("added", "- added")], prefix="prefix", postfix="postfix") body.clear() assert body.render() == ""
def test_sanitize(self): body = RecordBody([RecordSection("added", "- added")], prefix="prefix", postfix="postfix") body.sanitize() assert body.render() == "### Added\n- added"