File size: 423 Bytes
8ff1a92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"