File size: 551 Bytes
8ff1a92 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from app import render_iarc_block
def test_iarc_render_url():
md = render_iarc_block({"ok": True, "url": "https://example.com"})
assert "Search IARC Monographs" in md
assert "https://example.com" in md
def test_iarc_render_results_list():
md = render_iarc_block(
{
"ok": True,
"results": [
{"title": "IARC Monographs - Foo", "url": "https://example.com/foo", "year": "2020"}
],
}
)
assert "- [IARC Monographs - Foo](https://example.com/foo) (2020)" in md
|