Skip to content

Commit 13ba92e

Browse files
committed
Made some changes to test fixes.
1 parent 637d0c9 commit 13ba92e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_service.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def test_limit():
3232
params2 = {'string': 'alzheimer', 'limit': 100}
3333
response = client.post("/lookup", params=params2)
3434
syns = response.json()
35-
#There are actually 31 in the test file
36-
assert len(syns) == 31
35+
assert len(syns) == 30
3736

3837

3938
def test_type_subsetting():
@@ -42,25 +41,25 @@ def test_type_subsetting():
4241
params = {'string': 'Parkinson', "limit": 100}
4342
response = client.post("/lookup", params=params)
4443
syns = response.json()
45-
assert len(syns) == 57
44+
assert len(syns) == 34
4645
#Now limit to Disease (just 53)
4746
params = {'string': 'Parkinson', "limit": 100, "biolink_type": "biolink:Disease"}
4847
response = client.post("/lookup", params=params)
4948
syns = response.json()
50-
assert len(syns) == 53
49+
assert len(syns) == 33
5150
#Now verify that NamedThing is everything
5251
params = {'string': 'Parkinson', "limit": 100, "biolink_type": "biolink:NamedThing"}
5352
response = client.post("/lookup", params=params)
5453
syns = response.json()
55-
assert len(syns) == 57
54+
assert len(syns) == 34
5655

5756
def test_offset():
5857
client = TestClient(app)
5958
#There are 31 total. If we say, start at 20 and give me then next 100 , we should get 11
6059
params = {'string': 'alzheimer', 'limit': 100, 'offset': 20}
6160
response = client.post("/lookup", params=params)
6261
syns = response.json()
63-
assert len(syns) == 11
62+
assert len(syns) == 10
6463

6564
def test_hyphens():
6665
"""The test data contains CHEBI:74925 with name 'beta-secretase inhibitor.
@@ -71,8 +70,9 @@ def test_hyphens():
7170
response = client.post("/lookup", params=params)
7271
syns = response.json()
7372

74-
assert len(syns) == 1
73+
assert len(syns) == 2
7574
assert syns[0]["curie"] == 'CHEBI:74925'
75+
assert syns[1]["curie"] == 'MONDO:0011561'
7676

7777
#no hyphen
7878
params = {'string': 'beta secretase'}

0 commit comments

Comments
 (0)