Skip to content

Commit

Permalink
Add test for searching prod server
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvanderburg committed Oct 30, 2020
1 parent 62c3209 commit ebd12b1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_nanopub.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_nanopub_construction_with_bnode_introduced_concept():
)
assert str(nanopub.introduces_concept) == test_concept_uri


@pytest.mark.flaky(max_runs=10)
@skip_if_nanopub_server_unavailable
def test_find_nanopubs_with_text():
Expand All @@ -43,6 +44,19 @@ def test_find_nanopubs_with_text():
assert len(client.find_nanopubs_with_text('')) == 0


@pytest.mark.flaky(max_runs=10)
def test_find_nanopubs_with_text_prod():
"""
Check that Nanopub text search is returning results for a few common search terms on the
production nanopub server
"""
prod_client = NanopubClient()
searches = ['test', 'US']
for search in searches:
results = prod_client.find_nanopubs_with_text(search)
assert len(results) > 0


@pytest.mark.flaky(max_runs=10)
@skip_if_nanopub_server_unavailable
def test_find_nanopubs_with_pattern():
Expand Down

0 comments on commit ebd12b1

Please sign in to comment.