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
def test_dict(self): actual = as_markdown({"key": "value"}) expected = "key: \nvalue" assert_equals(expected, actual)
def test_empty_dict(self): actual = as_markdown(dict()) expected = "" assert_equals(expected, actual)
def test_list(self): actual = as_markdown(["hello", "world"]) expected = "* hello\n* world" assert_equals(expected, actual)
def test_empty_list(self): actual = as_markdown([]) expected = "" assert_equals(expected, actual)
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