TOXRA.AI / tests /test_iarc_render.py
hchevva's picture
Upload 5 files
8ff1a92 verified
raw
history blame contribute delete
551 Bytes
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