Skip to content

Commit

Permalink
Update tests to include settings object
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkst-marco committed Jul 9, 2024
1 parent 0961155 commit 05bfdc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions tests/units/test_channel_output_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/units/test_kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 05bfdc3

Please sign in to comment.