Skip to content

Commit 51b866f

Browse files
authored
Fix test_list_spaces_linked (#2707)
1 parent e2bc481 commit 51b866f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_hf_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2318,13 +2318,13 @@ def test_list_spaces_with_datasets(self):
23182318
assert "wikipedia" in spaces[0].datasets
23192319

23202320
def test_list_spaces_linked(self):
2321-
space_id = "open-llm-leaderboard/open_llm_leaderboard"
2321+
space_id = "stabilityai/stable-diffusion"
23222322

2323-
spaces = list(self._api.list_spaces(search=space_id))
2323+
spaces = [space for space in self._api.list_spaces(search=space_id) if space.id == space_id]
23242324
assert spaces[0].models is None
23252325
assert spaces[0].datasets is None
23262326

2327-
spaces = list(self._api.list_spaces(search=space_id, linked=True))
2327+
spaces = [space for space in self._api.list_spaces(search=space_id, linked=True) if space.id == space_id]
23282328
assert spaces[0].models is not None
23292329
assert spaces[0].datasets is not None
23302330

0 commit comments

Comments
 (0)