def test_organisations(self): sxapi = LowLevelAPI(private_endpoint=self.INTERN_ENDPOINT, public_endpoint=self.PUBLIC_ENDPOINT, api_key=self.API_KEY) with mock.patch('sxapi.low.BaseAPI.session') as patched_session: sxapi.query_organisations() call = patched_session.get.call_args_list self.assertEqual(call[0][0][0], "http://0.0.0.0:8787/internapi/v1/organisation/list")
def test_organisations(self): sxapi = LowLevelAPI(private_endpoint=self.INTERN_ENDPOINT, public_endpoint=self.PUBLIC_ENDPOINT, api_key=self.API_KEY) with MockGet() as patched_session: sxapi.query_organisations() call = patched_session.call_args_list self.assertEqual(call[0][0][0], "/organisation/list")