Skip to content

Commit

Permalink
Do not send staging token to production
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Jan 30, 2025
1 parent 536d8c2 commit 6c4a098
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/test_cache_no_symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from huggingface_hub.constants import CONFIG_NAME, HF_HUB_CACHE
from huggingface_hub.file_download import are_symlinks_supported

from .testing_constants import TOKEN
from .testing_utils import DUMMY_MODEL_ID, with_production_testing


Expand Down Expand Up @@ -55,7 +54,6 @@ def test_download_no_symlink_new_file(self, mock_are_symlinks_supported: Mock) -
filename=CONFIG_NAME,
cache_dir=self.cache_dir,
local_files_only=False,
use_auth_token=TOKEN,
)
)
# Not a symlink !
Expand All @@ -74,7 +72,6 @@ def test_download_no_symlink_existing_file(self, mock_are_symlinks_supported: Mo
filename=CONFIG_NAME,
cache_dir=self.cache_dir,
local_files_only=False,
use_auth_token=TOKEN,
)
)
self.assertTrue(filepath.is_symlink())
Expand All @@ -92,7 +89,6 @@ def test_download_no_symlink_existing_file(self, mock_are_symlinks_supported: Mo
filename=CONFIG_NAME,
cache_dir=self.cache_dir,
local_files_only=False,
use_auth_token=TOKEN,
)
)
# File exist but is not a symlink
Expand All @@ -116,23 +112,20 @@ def test_scan_and_delete_cache_no_symlinks(self, mock_are_symlinks_supported: Mo
DUMMY_MODEL_ID,
filename=CONFIG_NAME,
cache_dir=self.cache_dir,
use_auth_token=TOKEN,
)

# Download README.md from main
hf_hub_download(
DUMMY_MODEL_ID,
filename="README.md",
cache_dir=self.cache_dir,
use_auth_token=TOKEN,
)

# Download config.json from older revision
hf_hub_download(
DUMMY_MODEL_ID,
filename=CONFIG_NAME,
cache_dir=self.cache_dir,
use_auth_token=TOKEN,
revision=OLDER_REVISION,
)

Expand All @@ -144,7 +137,6 @@ def test_scan_and_delete_cache_no_symlinks(self, mock_are_symlinks_supported: Mo
DUMMY_MODEL_ID,
filename="merges.txt",
cache_dir=self.cache_dir,
use_auth_token=TOKEN,
revision=OLDER_REVISION,
)

Expand Down

0 comments on commit 6c4a098

Please sign in to comment.