Skip to content

Commit

Permalink
Update tests for ToolShed 2.0
Browse files Browse the repository at this point in the history
The test ToolShed https://testtoolshed.g2.bx.psu.edu/ has been
updated after galaxyproject/galaxy#15639
was merged.
  • Loading branch information
nsoranzo committed Oct 18, 2023
1 parent c07ed28 commit 22fc538
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bioblend/_tests/TestToolshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 22fc538

Please sign in to comment.