예제 #1
0
 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"
예제 #2
0
 def test_clear(self):
     body = RecordBody([RecordSection("added", "- added")],
                       prefix="prefix",
                       postfix="postfix")
     body.clear()
     assert body.render() == ""
예제 #3
0
 def test_sanitize(self):
     body = RecordBody([RecordSection("added", "- added")],
                       prefix="prefix",
                       postfix="postfix")
     body.sanitize()
     assert body.render() == "### Added\n- added"