[hf_api] delete deprecated methods and tests (2)

This commit is contained in:
Julien Chaumond
2021-02-12 21:46:17 +01:00
parent eed31db948
commit 641f418e10

View File

@@ -27,16 +27,7 @@ from transformers.testing_utils import require_git_lfs
USER = "__DUMMY_TRANSFORMERS_USER__"
PASS = "__DUMMY_TRANSFORMERS_PASS__"
FILES = [
(
"nested/Test-{}.txt".format(int(time.time())),
os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/input.txt"),
),
(
"nested/yoyo {}.txt".format(int(time.time())), # space is intentional
os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/empty.txt"),
),
]
ENDPOINT_STAGING = "https://moon-staging.huggingface.co"
ENDPOINT_STAGING_BASIC_AUTH = f"https://{USER}:{PASS}@moon-staging.huggingface.co"
@@ -69,11 +60,6 @@ class HfApiEndpointsTest(HfApiCommonTest):
"""
cls._token = cls._api.login(username=USER, password=PASS)
@classmethod
def tearDownClass(cls):
for FILE_KEY, FILE_PATH in FILES:
cls._api.delete_obj(token=cls._token, filetype="datasets", filename=FILE_KEY)
def test_whoami(self):
user, orgs = self._api.whoami(token=self._token)
self.assertEqual(user, USER)