diff --git a/python/lib/sift_client/_tests/conftest.py b/python/lib/sift_client/_tests/conftest.py index 070696f0e..397848d7e 100644 --- a/python/lib/sift_client/_tests/conftest.py +++ b/python/lib/sift_client/_tests/conftest.py @@ -25,7 +25,7 @@ def sift_client() -> SiftClient: api_key=api_key, grpc_url=grpc_url, rest_url=rest_url, - # use_ssl=True, + use_ssl=True, ) ) diff --git a/python/lib/sift_client/_tests/resources/test_calculated_channels.py b/python/lib/sift_client/_tests/resources/test_calculated_channels.py index bc75465e9..93fd4f16b 100644 --- a/python/lib/sift_client/_tests/resources/test_calculated_channels.py +++ b/python/lib/sift_client/_tests/resources/test_calculated_channels.py @@ -21,6 +21,7 @@ CalculatedChannelUpdate, ) from sift_client.sift_types.channel import ChannelReference +from sift_client.util import cel_utils as cel pytestmark = pytest.mark.integration @@ -46,7 +47,9 @@ def calculated_channels_api_sync(sift_client: SiftClient): @pytest.fixture def test_calculated_channel(calculated_channels_api_sync): - calculated_channels = calculated_channels_api_sync.list_(limit=1, include_archived=True) + calculated_channels = calculated_channels_api_sync.list_( + limit=1, include_archived=True, filter_query=cel.not_(cel.equals("client_key", "")) + ) assert calculated_channels assert len(calculated_channels) >= 1 return calculated_channels[0] diff --git a/python/lib/sift_client/_tests/resources/test_reports.py b/python/lib/sift_client/_tests/resources/test_reports.py index dad6ee0a5..8472ed276 100644 --- a/python/lib/sift_client/_tests/resources/test_reports.py +++ b/python/lib/sift_client/_tests/resources/test_reports.py @@ -132,7 +132,8 @@ def test_cancel(self, nostromo_asset, nostromo_run, test_rule, sift_client): canceled_report = sift_client.reports.find(report_ids=[second_rerun_report_id]) assert canceled_report is not None for summary in canceled_report.summaries: - assert summary.status == ReportRuleStatus.CANCELED + # Sometimes the report finishes before it can be canceled. + assert summary.status in [ReportRuleStatus.CANCELED, ReportRuleStatus.FINISHED] def test_archive(self, nostromo_run, test_rule, sift_client): report_from_rules = sift_client.reports.create_from_rules( diff --git a/python/lib/sift_client/transport/base_connection.py b/python/lib/sift_client/transport/base_connection.py index f98b0282a..02f0e096e 100644 --- a/python/lib/sift_client/transport/base_connection.py +++ b/python/lib/sift_client/transport/base_connection.py @@ -22,7 +22,7 @@ def __init__( grpc_url: str, rest_url: str, api_key: str, - use_ssl: bool = False, + use_ssl: bool = True, cert_via_openssl: bool = False, ): """Initialize the connection configuration.