Skip to content

Commit b70638b

Browse files
committed
Make self._perform_request not a static method. This allows us to mock things without effort
1 parent 67c0ba7 commit b70638b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

brainframe/api/stubs/base_stub.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,13 @@ def _send_with_session_id(self, request: requests.Request, timeout) \
315315

316316
return resp
317317

318-
@staticmethod
319-
def _perform_request(*args, **kwargs):
318+
def _perform_request(self, *args, **kwargs):
320319
"""Sends a request and handles any errors in the result
321320
322321
All arguments are passed to BaseStub._send_request
323322
"""
324323
try:
325-
resp = BaseStub._send_request(*args, **kwargs)
324+
resp = self._send_request(*args, **kwargs)
326325
except requests.exceptions.RequestException as exc:
327326
raise _make_api_error(exception=exc)
328327

0 commit comments

Comments
 (0)