Skip to content

Commit

Permalink
Test UnnecessaryEncodingUsed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Sep 1, 2023
1 parent b26739d commit 112b3fc
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/test_result_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
import pytest
import hashlib
import warnings
# Authentication via the test_authorization.py
from tests import test_authorization as Authorization

Expand All @@ -24,7 +25,8 @@
BaseResource,
Errors,
SampleUploads,
CSPMRegistration
CSPMRegistration,
UnnecessaryEncodingUsed
)
from falconpy._result._base_dictionary import UnsupportedPythonVersion

Expand Down Expand Up @@ -728,3 +730,17 @@ def test_unusual_response_formatting(self):
if isinstance(result, dict):
_returned = True
assert _returned

@not_supported
def test_unnecessary_encoding_used_warning(self):
with pytest.warns(UnnecessaryEncodingUsed):
# warnings.warn("Debug", UnnecessaryEncodingUsed)
_success = True
try:
hosts = Hosts(auth_object=config, pythonic=True)
hosts.query_devices_by_filter_scroll(filter="hostname%3A%27falconpy%27")
except APIError:
_success = True
hosts = Hosts(auth_object=hosts, pythonic=False)
hosts.query_devices_by_filter_scroll(filter="hostname%3A%27falconpy%27")
assert _success

0 comments on commit 112b3fc

Please sign in to comment.