diff --git a/tests/test_uber_api_complete.py b/tests/test_uber_api_complete.py index 420c6dc64..16bb2e5d9 100644 --- a/tests/test_uber_api_complete.py +++ b/tests/test_uber_api_complete.py @@ -12,7 +12,7 @@ # flake8: noqa=E402 # pylint: disable=C0103 # Classes to test - manually imported from our sibling folder -from falconpy import APIHarness +from falconpy import APIHarness, APIError # Import perform_request from _util so we can test generating 405's directly from falconpy._util import perform_request, force_default @@ -354,8 +354,7 @@ def test_uber_deprecated_attributes(self): def test_uber_properties(self): # Force a new object so we can flip the debug flag - temp_falcon = APIHarness(client_id=config["falcon_client_id"], - client_secret=config["falcon_client_secret"], + temp_falcon = APIHarness(access_token=falcon.token_value, base_url=config["falcon_base_url"], debug=True ) @@ -369,3 +368,16 @@ def test_uber_revoke_success(self): assert(bool( falcon.command("oauth2RevokeToken", token_value=falcon.token_value)["status_code"]==200 )) + + def test_pythonic_failure(self): + _success = False + new_falcon = APIHarness(access_token=falcon.token_value, + base_url=config["falcon_base_url"], + debug=_DEBUG, + pythonic=True + ) + try: + new_falcon.command("GetDeviceDetails", ids="12345678") + except APIError: + _success = True + assert _success