Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjambrecic committed Nov 13, 2024
1 parent 04bcffb commit 850c2f7
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/test_mailchimp_openapi_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
)

0 comments on commit 850c2f7

Please sign in to comment.