From b63d4b294c36ce1a1686f2a2439729c8143b9821 Mon Sep 17 00:00:00 2001 From: David Michaels Date: Mon, 18 Dec 2023 15:59:12 -0500 Subject: [PATCH] portal_utils tests --- dcicutils/portal_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dcicutils/portal_utils.py b/dcicutils/portal_utils.py index 4563b4d9b..c88b34090 100644 --- a/dcicutils/portal_utils.py +++ b/dcicutils/portal_utils.py @@ -220,7 +220,7 @@ def patch(self, uri: str, data: Optional[dict] = None, json: Optional[dict] = None, **kwargs) -> Optional[Union[RequestResponse, TestResponse]]: if self._vapp: return self._vapp.patch_json(self.url(uri), json or data, **self._kwargs(**kwargs)) - return requests.patch(self.url(uri), data=json or data, **self._kwargs(**kwargs)) + return requests.patch(self.url(uri), data=data, json=json, **self._kwargs(**kwargs)) def post(self, uri: str, data: Optional[dict] = None, json: Optional[dict] = None, files: Optional[dict] = None, **kwargs) -> Optional[Union[RequestResponse, TestResponse]]: @@ -229,7 +229,7 @@ def post(self, uri: str, data: Optional[dict] = None, json: Optional[dict] = Non return self._vapp.post(self.url(uri), json or data, upload_files=files, **self._kwargs(**kwargs)) else: return self._vapp.post_json(self.url(uri), json or data, upload_files=files, **self._kwargs(**kwargs)) - return requests.post(self.url(uri), data=json or data, files=files, **self._kwargs(**kwargs)) + return requests.post(self.url(uri), data=data, json=json, files=files, **self._kwargs(**kwargs)) def get_schema(self, schema_name: str) -> Optional[dict]: return get_schema(self.schema_name(schema_name), portal_vapp=self._vapp, key=self._key)