Fix test cases for compatibility with httpx 0.28.0.

This commit is contained in:
依瑪貓 2024-12-09 08:29:04 +08:00
parent 9da7cec1f5
commit 76ae576717
3 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,7 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
devel = [ devel = [
"httpx", "httpx >= 0.20.0",
] ]
[project.urls] [project.urls]

View File

@ -66,7 +66,8 @@ class AuthenticationTestCase(unittest.TestCase):
"DIGEST_AUTH_REALM": REALM, "DIGEST_AUTH_REALM": REALM,
}) })
self.__client: httpx.Client = httpx.Client( self.__client: httpx.Client = httpx.Client(
app=app, base_url="https://testserver") transport=httpx.WSGITransport(app=app),
base_url="https://testserver")
"""The testing client.""" """The testing client."""
auth: DigestAuth = DigestAuth() auth: DigestAuth = DigestAuth()

View File

@ -91,7 +91,8 @@ class FlaskLoginTestCase(unittest.TestCase):
"DIGEST_AUTH_REALM": REALM, "DIGEST_AUTH_REALM": REALM,
}) })
self.__client: httpx.Client = httpx.Client( self.__client: httpx.Client = httpx.Client(
app=self.app, base_url="https://testserver") transport=httpx.WSGITransport(app=self.app),
base_url="https://testserver")
"""The testing client.""" """The testing client."""
self.__has_flask_login: bool = True self.__has_flask_login: bool = True