From d29a845764e6e06eec081cd7730062c463becf3c Mon Sep 17 00:00:00 2001 From: Danny Webb Date: Wed, 9 Oct 2024 08:51:33 +0100 Subject: [PATCH] fix mock ordering --- .../grafana/grafana_silence/test_grafana_silence.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py b/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py index 716e5fdf..df28ecc2 100644 --- a/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py +++ b/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py @@ -171,13 +171,13 @@ def test_create_silence_new_silence( # create a new silence with alertmanager datasource defined @patch( - "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_silence" + "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.datasource_by_name" ) @patch( - "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" + "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_silence" ) @patch( - "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.datasource_by_name" + "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" ) @patch( "ansible_collections.community.grafana.plugins.modules.grafana_silence.fetch_url" @@ -306,10 +306,10 @@ def test_delete_silence(self, mock_fetch_url, mock_get_version): self.assertEquals(result, {"message": "silence deleted"}) @patch( - "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" + "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.datasource_by_name" ) @patch( - "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.datasource_by_name" + "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" ) @patch( "ansible_collections.community.grafana.plugins.modules.grafana_silence.fetch_url"