Skip to content

Commit

Permalink
Skip unsupported SSL unit test on usgov1
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Jan 30, 2024
1 parent a8fd61a commit 9df164b
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions tests/test_service_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,18 +376,22 @@ def test_list_response_component_get_property(self):
@rate_limited
@not_supported
def test_list_response_component_get_property_fail(self):
with pytest.warns(SSLDisabledWarning):
_no_ssl = Hosts(creds=config.creds, pythonic=True, debug=_DEBUG, ssl_verify=False)
if _no_ssl.token_status == 403:
pytest.skip("SSL required for GovCloud testing.")
try:
if _no_ssl.token_valid and not _no_ssl.token_stale: # Duplicative, just testing the properties
_thing: Result = _no_ssl.query_devices(limit=3)
except APIError:
pytest.skip("SSL required for GovCloud testing.")

position = 5
_success = False
print(config.base_url)
if "lagger" not in config.base_url:
with pytest.warns(SSLDisabledWarning):
_no_ssl = Hosts(creds=config.creds, pythonic=True, debug=_DEBUG, ssl_verify=False)
if _no_ssl.token_status == 403:
pytest.skip("SSL required for GovCloud testing.")
try:
if _no_ssl.token_valid and not _no_ssl.token_stale: # Duplicative, just testing the properties
_thing: Result = _no_ssl.query_devices(limit=3)
except APIError:
pytest.skip("SSL required for GovCloud testing.")
else:
pytest.skip("This test is unsupported in this region.")

try:
_success = bool(_thing.resources.get_property(position))
except IndexError:
Expand Down

0 comments on commit 9df164b

Please sign in to comment.