From 850c2f76bbccd714cc42f7e08481c46b628c75d3 Mon Sep 17 00:00:00 2001 From: Robert Jambrecic Date: Wed, 13 Nov 2024 14:17:49 +0000 Subject: [PATCH] Update tests --- tests/test_mailchimp_openapi_spec.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/test_mailchimp_openapi_spec.py b/tests/test_mailchimp_openapi_spec.py index 696be59..6771c51 100644 --- a/tests/test_mailchimp_openapi_spec.py +++ b/tests/test_mailchimp_openapi_spec.py @@ -53,7 +53,7 @@ def _test_mailchimp_api( func(body={}) @patch("fastagency.api.openapi.client.requests.get") - def test_mailchimp_api( + def test_mailchimp_api_ping( self, mock_post: MagicMock, setup_api: OpenAPI, @@ -69,3 +69,21 @@ def test_mailchimp_api( params={}, headers=self.headers, ) + + @patch("fastagency.api.openapi.client.requests.get") + def test_mailchimp_api_get_lists( + self, + mock_post: MagicMock, + setup_api: OpenAPI, + ) -> None: + self._test_mailchimp_api( + mock_post=mock_post, + setup_api=setup_api, + function="get_lists", + ) + + mock_post.assert_called_once_with( + f"{setup_api.servers[0]['url']}/lists", + params={}, + headers=self.headers, + )