Skip to content

Commit

Permalink
Fix test_list_spaces_linked (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored Dec 11, 2024
1 parent e2bc481 commit 51b866f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2318,13 +2318,13 @@ def test_list_spaces_with_datasets(self):
assert "wikipedia" in spaces[0].datasets

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

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

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

Expand Down

0 comments on commit 51b866f

Please sign in to comment.