Skip to content

Commit

Permalink
fix move repo test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Apr 4, 2023
1 parent f5ddbec commit d751269
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/test_hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,9 @@ def test_move_repo_normal_usage(self):
repo_id = f"{USER}/{repo_name()}"
new_repo_id = f"{USER}/{repo_name()}"

for repo_type in [None, REPO_TYPE_MODEL, REPO_TYPE_DATASET, REPO_TYPE_SPACE]:
self._api.create_repo(
repo_id=repo_id,
repo_type=repo_type,
space_sdk="static" if repo_type == REPO_TYPE_SPACE else None,
)
# Should raise an error if it fails
# Spaces not tested on staging (error 500)
for repo_type in [None, REPO_TYPE_MODEL, REPO_TYPE_DATASET]:
self._api.create_repo(repo_id=repo_id, repo_type=repo_type)
self._api.move_repo(from_id=repo_id, to_id=new_repo_id, repo_type=repo_type)
self._api.delete_repo(repo_id=new_repo_id, repo_type=repo_type)

Expand Down

0 comments on commit d751269

Please sign in to comment.