From 05bfdc3da76cdef89325fbb0b287e9d4f44f14b7 Mon Sep 17 00:00:00 2001 From: Marco Slaviero Date: Tue, 9 Jul 2024 14:15:17 +0000 Subject: [PATCH] Update tests to include settings object --- tests/units/test_channel_output_webhook.py | 12 ++++++------ tests/units/test_kubeconfig.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/units/test_channel_output_webhook.py b/tests/units/test_channel_output_webhook.py index e3953d537..b10d94f2c 100644 --- a/tests/units/test_channel_output_webhook.py +++ b/tests/units/test_channel_output_webhook.py @@ -24,7 +24,7 @@ def test_broken_webhook( frontend_settings: FrontendSettings, settings: SwitchboardSettings, ): - switchboard = Switchboard() + switchboard = Switchboard(settings) switchboard.switchboard_settings = settings webhook_channel = WebhookOutputChannel( switchboard=switchboard, @@ -72,7 +72,7 @@ def test_webhook( frontend_settings: FrontendSettings, settings: SwitchboardSettings, ): - switchboard = Switchboard() + switchboard = Switchboard(settings) webhook_channel = WebhookOutputChannel( switchboard=switchboard, switchboard_scheme=settings.SWITCHBOARD_SCHEME, @@ -118,7 +118,7 @@ def test_googlechat_webhook_format( settings: SwitchboardSettings, ): - switchboard = Switchboard() + switchboard = Switchboard(settings) input_channel = ChannelDNS( switchboard=switchboard, frontend_settings=frontend_settings, @@ -201,7 +201,7 @@ def test_canaryalert_googlechat_webhook( "https://chat.googleapis.com/v1/spaces/random/messages?key=temp_key" ) - switchboard = Switchboard() + switchboard = Switchboard(settings) input_channel = ChannelDNS( switchboard=switchboard, frontend_settings=frontend_settings, @@ -242,7 +242,7 @@ def test_ms_teams_webhook_format( frontend_settings: FrontendSettings, settings: SwitchboardSettings, ): - switchboard = Switchboard() + switchboard = Switchboard(settings) input_channel = ChannelDNS( switchboard=switchboard, frontend_settings=frontend_settings, @@ -305,7 +305,7 @@ def test_canaryalert_ms_teams_webhook( """ ms_teams_webhook_receiver = "https://azurerandomtest.webhook.office.com/webhookb2/ramdomhashhere/IncomingWebhook/randomhashhere/randomhashhere" - switchboard = Switchboard() + switchboard = Switchboard(settings) input_channel = ChannelDNS( switchboard=switchboard, frontend_settings=frontend_settings, diff --git a/tests/units/test_kubeconfig.py b/tests/units/test_kubeconfig.py index 905fe1ddf..9038dc80e 100644 --- a/tests/units/test_kubeconfig.py +++ b/tests/units/test_kubeconfig.py @@ -88,7 +88,7 @@ def test_mtls_factory_receive_lines( kubeconfig=kube_config, ) queries.save_canarydrop(canarydrop) - switchboard = Switchboard() + switchboard = Switchboard(settings) kuc = kubeconfig.KubeConfig( client_ca_redis_key=kc.ClientCA, server_ca_redis_key=kc.ServerCA, @@ -137,7 +137,7 @@ def test_mtls_factory_receive_lines( def test_ChannelKubeConfig( frontend_settings: FrontendSettings, settings: SwitchboardSettings, setup_db ): - switchboard = Switchboard() + switchboard = Switchboard(settings) kube_channel = ChannelKubeConfig( frontend_settings=frontend_settings, switchboard_settings=settings,