Prepare tests for hfh 0.14 (#22958)
* Test hf_hub 0.14.0rc1 * fix mocked tests * package version --------- Co-authored-by: Sylvain Gugger <Sylvain.gugger@gmail.com> Co-authored-by: testbot <lucainp@hf.co>
This commit is contained in:
@@ -89,7 +89,7 @@ class GetFromCacheTests(unittest.TestCase):
|
||||
response_mock.json.return_value = {}
|
||||
|
||||
# Under the mock environment we get a 500 error when trying to reach the tokenizer.
|
||||
with mock.patch("requests.request", return_value=response_mock) as mock_head:
|
||||
with mock.patch("requests.Session.request", return_value=response_mock) as mock_head:
|
||||
path = cached_file(RANDOM_BERT, "conf", _raise_exceptions_for_connection_errors=False)
|
||||
self.assertIsNone(path)
|
||||
# This check we did call the fake head request
|
||||
|
||||
Reference in New Issue
Block a user