Fix mock in test_cached_files_are_used_when_internet_is_down (#18804)
This commit is contained in:
@@ -2931,6 +2931,7 @@ class ModelUtilsTest(TestCasePlus):
|
||||
response_mock.status_code = 500
|
||||
response_mock.headers = {}
|
||||
response_mock.raise_for_status.side_effect = HTTPError
|
||||
response_mock.json.return_value = {}
|
||||
|
||||
# Download this model to make sure it's in the cache.
|
||||
_ = BertModel.from_pretrained("hf-internal-testing/tiny-random-bert")
|
||||
|
||||
Reference in New Issue
Block a user