diff --git a/changelogs/fragments/406-python3.12.yml b/changelogs/fragments/406-python3.12.yml new file mode 100644 index 00000000..376cc7a1 --- /dev/null +++ b/changelogs/fragments/406-python3.12.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - "test: replace more deprecated `TestCase.assertEquals` to support Python 3.12" 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 c2bb1df3..6ce81624 100644 --- a/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py +++ b/tests/unit/modules/grafana/grafana_silence/test_grafana_silence.py @@ -162,7 +162,7 @@ def test_create_silence_new_silence( }, method="POST", ) - self.assertEquals(result, {"silenceID": "470b7116-8f06-4bb6-9e6c-6258aa92218e"}) + self.assertEqual(result, {"silenceID": "470b7116-8f06-4bb6-9e6c-6258aa92218e"}) @patch( "ansible_collections.community.grafana.plugins.modules.grafana_silence.GrafanaSilenceInterface.get_version" @@ -208,4 +208,4 @@ def test_delete_silence(self, mock_fetch_url, mock_get_version): }, method="DELETE", ) - self.assertEquals(result, {"message": "silence deleted"}) + self.assertEqual(result, {"message": "silence deleted"})