TOXRA.AI / tests /test_cdc.py
hchevva's picture
Upload 5 files
8ff1a92 verified
raw
history blame contribute delete
423 Bytes
from core.sources import cdc
def test_cdc_cas_exact_match():
matches = cdc.search("67-64-1")
assert any(m.get("name") == "Acetone" for m in matches)
def test_cdc_name_substring_match():
matches = cdc.search("xylene")
assert len(matches) >= 3
def test_cdc_toxprofile_for_unique():
match = cdc.toxprofile_for("Acrylamide")
assert isinstance(match, dict)
assert match.get("cas") == "79-06-1"