Total Complexity | 1 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import pytest |
||
2 | |||
3 | from mandos.cli import Commands, What |
||
4 | |||
5 | from . import get_test_resource |
||
6 | |||
7 | |||
8 | class TestMechanismSearch: |
||
9 | def test_find(self): |
||
10 | df, triples = Commands.search_for(What.mechanism, get_test_resource("inchis.txt"), None) |
||
11 | assert len(df) == 1 |
||
12 | assert len(triples) == 1 |
||
13 | assert triples[0].compound_name.lower() == "alprazolam" |
||
14 | # CHEMBL2109244 is GABA-A receptor; agonist GABA site |
||
15 | assert triples[0].compound_id == "CHEMBL661" |
||
16 | assert triples[0].object_id == "CHEMBL2093872" |
||
17 | assert triples[0].predicate == "positive allosteric modulator" |
||
18 | |||
19 | |||
20 | if __name__ == "__main__": |
||
21 | pytest.main() |
||
22 |