Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Sep 22, 2023
1 parent 4a42140 commit d7f42f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_utils_errors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from requests.models import Response
from requests.models import PreparedRequest, Response

from huggingface_hub.utils._errors import (
BadRequestError,
Expand All @@ -27,6 +27,7 @@ def test_hf_raise_for_status_repo_not_found_without_error_code(self) -> None:
response = Response()
response.headers = {"X-Request-Id": 123}
response.status_code = 401
response.request = PreparedRequest()
with self.assertRaisesRegex(RepositoryNotFoundError, "Repository Not Found") as context:
hf_raise_for_status(response)

Expand Down

0 comments on commit d7f42f4

Please sign in to comment.