Changed the make_authorization method from private to public in the test client.

This commit is contained in:
依瑪貓 2022-11-24 21:45:11 +11:00
parent 2156aa710f
commit 3dcc409bef

View File

@ -49,13 +49,13 @@ class Client(WerkzeugClient):
return response return response
if hasattr(g, "_login_user"): if hasattr(g, "_login_user"):
delattr(g, "_login_user") delattr(g, "_login_user")
auth_data: Authorization = self.__class__.__make_authorization( auth_data: Authorization = self.__class__.make_authorization(
www_authenticate, args[0], digest_auth[0], digest_auth[1]) www_authenticate, args[0], digest_auth[0], digest_auth[1])
response = super(Client, self).open(*args, auth=auth_data, **kwargs) response = super(Client, self).open(*args, auth=auth_data, **kwargs)
return response return response
@staticmethod @staticmethod
def __make_authorization(www_authenticate: WWWAuthenticate, uri: str, def make_authorization(www_authenticate: WWWAuthenticate, uri: str,
username: str, password: str) -> Authorization: username: str, password: str) -> Authorization:
"""Composes and returns the request authorization. """Composes and returns the request authorization.