Skip to content

Commit

Permalink
Expand unit testing to complete code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Nov 20, 2023
1 parent 19d5828 commit 886117d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
10 changes: 10 additions & 0 deletions tests/test_service_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 7 additions & 5 deletions tests/test_spotlight_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions tests/test_uber.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -388,3 +395,4 @@ def test_pythonic_failure(self):
except APIError:
_success = True
assert _success

0 comments on commit 886117d

Please sign in to comment.