diff --git a/tests/test_service_class.py b/tests/test_service_class.py index 23c691c0b..627740746 100644 --- a/tests/test_service_class.py +++ b/tests/test_service_class.py @@ -187,12 +187,22 @@ def test_property_proxy_setter(self): _returned = bool(_CLEAN.proxy["https"] == "https://we-stop-breaches:8000") assert bool(_returned) + @rate_limited + @not_supported + def test_service_class_context_manager(self): + _success = False + with _CLEAN as sdk: + if sdk.query_devices()["status_code"] == 200: + _success = True + assert _success + @rate_limited @not_supported def test_disable_ssl_verify_dynamic(self): _CLEAN.ssl_verify = False assert bool(not _CLEAN.ssl_verify) + @rate_limited @not_supported def test_property_base_service_class_proxy(self): diff --git a/tests/test_spotlight_vulnerabilities.py b/tests/test_spotlight_vulnerabilities.py index 426ae15b2..231bfc0b4 100644 --- a/tests/test_spotlight_vulnerabilities.py +++ b/tests/test_spotlight_vulnerabilities.py @@ -20,11 +20,13 @@ class TestSpotlight: def spotlight_queryVulnerabilities(self): - if falcon.queryVulnerabilities( - parameters={"limit": 1, - "filter": "created_timestamp:>'2021-01-01T00:00:01Z'" - } - )["status_code"] in AllowedResponses: + result = falcon.queryVulnerabilities(parameters={"limit": 1, + "filter": "created_timestamp:>'2021-01-01T00:00:01Z'" + }, + pythonic=True + ) + if result.status_code in AllowedResponses: + _ = result.after return True else: return False diff --git a/tests/test_uber.py b/tests/test_uber.py index d6d9f4055..c905bca31 100644 --- a/tests/test_uber.py +++ b/tests/test_uber.py @@ -45,6 +45,13 @@ class TestUber: + def test_uber_context_manager(self): + _success = False + with falcon as sdk: + if sdk.command("QueryDevicesByFilterScroll")["status_code"] == 200: + _success = True + assert _success + def uberCCAWS_GetAWSSettings(self): returned = False authenticated = falcon.authenticated() @@ -388,3 +395,4 @@ def test_pythonic_failure(self): except APIError: _success = True assert _success +