1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

Added some test cases for the MarkdownLinktreeProcessor

This commit is contained in:
Bastian Venthur
2022-06-28 21:38:47 +02:00
parent db4e03afde
commit 6005369108
2 changed files with 15 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
* respective default answers will be written to config if user provided no
answer
* added tests for quickstart
* Added some test cases for the MarkdownLinktreeProcessor
## [1.3.1] - 2022-06-10

View File

@@ -32,6 +32,20 @@ def test_convert_markdown_links(input_, expected):
assert expected in html
@pytest.mark.parametrize("input_, expected", [
# scheme
('[test](https://)', 'https://'),
# netloc
('[test](//test.md)', '//test.md'),
# no path
('[test]()', ''),
])
def test_dont_convert_normal_links(input_, expected):
md = markdown_factory()
html, _ = convert_markdown(md, input_)
assert expected in html
@pytest.mark.parametrize("input_, expected", [
('foo: bar', {'foo': 'bar'}),
('foo: those are several words', {'foo': 'those are several words'}),