Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
641f418e
Commit
641f418e
authored
Feb 12, 2021
by
Julien Chaumond
Browse files
[hf_api] delete deprecated methods and tests (2)
parent
eed31db9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
tests/test_hf_api.py
tests/test_hf_api.py
+1
-15
No files found.
tests/test_hf_api.py
View file @
641f418e
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment