@@ -34,13 +34,17 @@ def test_repositories_client(self):
34
34
# get_repositories
35
35
repositories = self .ts .repositories .get_repositories ()
36
36
assert len (repositories ) > 5000
37
- assert repositories [0 ]["model_class" ] == "Repository"
37
+ repository0 = repositories [0 ]
38
+ for key in ("id" , "name" , "owner" , "type" , "description" , "deprecated" ):
39
+ assert key in repository0
38
40
39
41
repositories = self .ts .repositories .get_repositories (name = "bam_to_sam" , owner = "devteam" )
40
42
assert len (repositories ) == 1
41
43
bam_to_sam_repo = repositories [0 ]
42
44
assert bam_to_sam_repo ["name" ] == "bam_to_sam"
43
45
assert bam_to_sam_repo ["owner" ] == "devteam"
46
+ assert bam_to_sam_repo ["type" ] == "unrestricted"
47
+ assert not bam_to_sam_repo ["deprecated" ]
44
48
45
49
# search_repositories
46
50
samtools_search = self .ts .repositories .search_repositories ("samtools" , page_size = 5 )
@@ -74,5 +78,8 @@ def test_repositories_revisions(self):
74
78
def test_tools_client (self ):
75
79
# search_tools
76
80
samtools_search = self .ts .tools .search_tools ("samtools" , page_size = 5 )
77
- assert int (samtools_search ["total_results " ]) > 2000
81
+ assert int (samtools_search ["page " ]) == 1
78
82
assert len (samtools_search ["hits" ]) == 5
83
+ hit0_tool = samtools_search ["hits" ][0 ]["tool" ]
84
+ for key in ("id" , "repo_owner_username" , "repo_name" , "name" , "description" ):
85
+ assert key in hit0_tool
0 commit comments