From 933b910c8192abf3d97b6458c9aa2b7abd989aed Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 18 Oct 2023 11:46:16 +0100 Subject: [PATCH] Update tests for ToolShed 2.0 The test ToolShed https://testtoolshed.g2.bx.psu.edu/ has been updated after https://github.com/galaxyproject/galaxy/pull/15639 was merged. --- bioblend/_tests/TestToolshed.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bioblend/_tests/TestToolshed.py b/bioblend/_tests/TestToolshed.py index 09fe09de9..7a40dd8a4 100644 --- a/bioblend/_tests/TestToolshed.py +++ b/bioblend/_tests/TestToolshed.py @@ -34,13 +34,17 @@ def test_repositories_client(self): # get_repositories repositories = self.ts.repositories.get_repositories() assert len(repositories) > 5000 - assert repositories[0]["model_class"] == "Repository" + repository0 = repositories[0] + for key in ("id", "name", "owner", "type", "description", "deprecated"): + assert key in repository0 repositories = self.ts.repositories.get_repositories(name="bam_to_sam", owner="devteam") assert len(repositories) == 1 bam_to_sam_repo = repositories[0] assert bam_to_sam_repo["name"] == "bam_to_sam" assert bam_to_sam_repo["owner"] == "devteam" + assert bam_to_sam_repo["type"] == "unrestricted" + assert not bam_to_sam_repo["deprecated"] # search_repositories samtools_search = self.ts.repositories.search_repositories("samtools", page_size=5) @@ -74,5 +78,8 @@ def test_repositories_revisions(self): def test_tools_client(self): # search_tools samtools_search = self.ts.tools.search_tools("samtools", page_size=5) - assert int(samtools_search["total_results"]) > 2000 + assert int(samtools_search["page"]) == 1 assert len(samtools_search["hits"]) == 5 + hit0_tool = samtools_search["hits"][0]["tool"] + for key in ("id", "repo_owner_username", "repo_name", "name", "description"): + assert key in hit0_tool