Skip to content

Commit

Permalink
portal_utils tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Dec 18, 2023
1 parent 58ab914 commit ce6a5bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dcicutils/portal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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), json=json or data, **self._kwargs(**kwargs))
return requests.patch(self.url(uri), data=json or data, **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]]:
Expand All @@ -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), json=json or data, files=files, **self._kwargs(**kwargs))
return requests.post(self.url(uri), data=json or data, 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)
Expand Down

0 comments on commit ce6a5bb

Please sign in to comment.