Skip to content

Commit

Permalink
Chose one of the random agents and stick to it for test
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Nov 22, 2023
1 parent a3b06d0 commit 42edcb9
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions indra/tests/test_db_rest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import random
import unittest
from datetime import datetime
from time import sleep
Expand Down Expand Up @@ -58,23 +57,19 @@ def test_bigger_request():


@pytest.mark.nonpublic
def test_timeout_no_persist_agent():
candidates = ['TP53', 'NFkappaB@FPLX', 'AKT@FPLX']
agent = random.choice(candidates)
print(agent)
resp = dbr.get_statements(agents=[agent], persist=False, timeout=0)
def test_timeout_no_persist_nfkb():
resp = dbr.get_statements(agents=["NFkappaB@FPLX"], persist=False, timeout=0)
assert resp.is_working(), "Lookup resolved too fast."
resp.wait_until_done(70)
assert len(resp.statements) > 0.9*EXPECTED_BATCH_SIZE, len(resp.statements)


@pytest.mark.nonpublic
def test_timeout_no_persist_type_object():
candidates = ['TP53', 'NFkappaB@FPLX', 'AKT@FPLX']
agent = random.choice(candidates)
print(agent)
resp = dbr.get_statements(stmt_type='phosphorylation', object=agent,
persist=False, timeout=0)
resp = dbr.get_statements(stmt_type='phosphorylation',
object="NFkappaB@FPLX",
persist=False,
timeout=0)
assert resp.is_working(), "Lookup resolved too fast."
resp.wait_until_done(70)
assert len(resp.statements) > 0.9*EXPECTED_BATCH_SIZE, len(resp.statements)
Expand Down

0 comments on commit 42edcb9

Please sign in to comment.