Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWang committed Jul 18, 2024
1 parent d0fe7fb commit 791f306
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from gravitino.dto.requests.oauth2_client_credential_request import (
OAuth2ClientCredentialRequest,
)
from gravitino.exceptions.gravitino_runtime_exception import GravitinoRuntimeException
from gravitino.exceptions.base import GravitinoRuntimeException

CLIENT_CREDENTIALS = "client_credentials"
CREDENTIAL_SPLITTER = ":"
Expand Down
6 changes: 5 additions & 1 deletion clients/client-python/gravitino/utils/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def _make_request(self, opener, request, timeout=None) -> Tuple[bool, Response]:

return (False, err_resp)

# pylint: disable=too-many-locals
def _request(
self,
method,
Expand Down Expand Up @@ -224,8 +225,11 @@ def put(self, endpoint, json=None, error_handler=None, **kwargs):
return self._request(
"put", endpoint, json=json, error_handler=error_handler, **kwargs
)

def post_form(self, endpoint, data=None, error_handler=None, **kwargs):
return self._request("post", endpoint, data=data, error_handler=error_handler **kwargs)
return self._request(
"post", endpoint, data=data, error_handler=error_handler**kwargs
)

def close(self):
self._request("close", "/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ def test_auth_provider(self):
token[len(AuthConstants.AUTHORIZATION_BASIC_HEADER) :]
).decode("utf-8")
self.assertEqual(f"{user}:dummy", token_string)
os.environ["GRAVITINO_USER"] = ""

0 comments on commit 791f306

Please sign in to comment.