Skip to content
Prev Previous commit
Next Next commit
ODSC-39392: fix the test
  • Loading branch information
Ziqun Ye committed Apr 24, 2023
commit 9fdb1ffb7cf0d5bb01ab919fbc537a7f5592cf43
2 changes: 1 addition & 1 deletion ads/model/deployment/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def send_request(

request_kwargs["headers"] = header

request_kwargs["auth"] = header.pop("signer")
if dry_run:
request_kwargs["headers"]["Accept"] = "*/*"
req = requests.Request("POST", endpoint, **request_kwargs).prepare()
if is_json_payload:
return json.loads(req.body)
return req.body
else:
request_kwargs["auth"] = header.pop("signer")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we pop signer for dry_run as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return requests.post(endpoint, **request_kwargs).json()


Expand Down