예제 #1
0
 def _to_markdown_dict(finding: Finding) -> Dict[str, str]:
     markdown_dict = dict()
     for key, value in finding.items():
         if key != _SNIPPETS_KEY:
             markdown_dict[key] = as_markdown(value)
     return markdown_dict
예제 #2
0
 def test_dict(self):
     actual = as_markdown({"key": "value"})
     expected = "key: \nvalue"
     assert_equals(expected, actual)
예제 #3
0
 def test_empty_dict(self):
     actual = as_markdown(dict())
     expected = ""
     assert_equals(expected, actual)
예제 #4
0
 def test_list(self):
     actual = as_markdown(["hello", "world"])
     expected = "* hello\n* world"
     assert_equals(expected, actual)
예제 #5
0
 def test_empty_list(self):
     actual = as_markdown([])
     expected = ""
     assert_equals(expected, actual)
예제 #6
0
 def _to_markdown_dict(self, finding: SpecializedFinding) -> Dict[str, str]:
     markdown_dict = dict()
     for key, value in finding.items():
         markdown_dict[key] = as_markdown(value)
     return markdown_dict