fix cookies and file_exists

This commit is contained in:
wangxingjun778
2025-01-18 10:09:54 +08:00
parent 05e8b0aee2
commit 163488c0cc
2 changed files with 3 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
# Make sure to modify __release_datetime__ to release time when making official release.
__version__ = '1.22.2'
__version__ = '1.22.3'
# default release datetime for branches under active development is set
# to be a time far-far-away-into-the-future
__release_datetime__ = '2025-01-16 08:00:00'
__release_datetime__ = '2025-01-18 12:00:00'

View File

@@ -1,24 +1,8 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import os
import shutil
import tempfile
import unittest
import uuid
from os.path import expanduser
from requests import delete
from modelscope.hub.api import HubApi
from modelscope.hub.constants import Licenses, ModelVisibility
from modelscope.hub.errors import NotExistError
from modelscope.hub.file_download import model_file_download
from modelscope.hub.git import GitCommandWrapper
from modelscope.hub.repository import Repository
from modelscope.utils.constant import ModelFile
from modelscope.utils.logger import get_logger
from modelscope.utils.test_utils import (TEST_ACCESS_TOKEN1,
TEST_MODEL_CHINESE_NAME,
TEST_MODEL_ORG, delete_credential)
logger = get_logger()
logger.setLevel('DEBUG')
@@ -28,7 +12,7 @@ download_model_file_name = 'test.bin'
class FileExistsTest(unittest.TestCase):
def test_file_exsists(self):
def test_file_exists(self):
api = HubApi()
self.assertTrue(
api.file_exists('iic/gte_Qwen2-7B-instruct', 'added_tokens.json'))