From 69140d5397b7b1924d539192c7719d0a842302e6 Mon Sep 17 00:00:00 2001 From: Boekhorst Date: Tue, 10 Sep 2024 09:19:35 +0000 Subject: [PATCH] fix: changing name of response mock to V1DeploymentList Signed-off-by: Boekhorst --- tests/modules/test_k8s_prerequisites_check.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/test_k8s_prerequisites_check.py b/tests/modules/test_k8s_prerequisites_check.py index 6e39707..714f05f 100644 --- a/tests/modules/test_k8s_prerequisites_check.py +++ b/tests/modules/test_k8s_prerequisites_check.py @@ -19,8 +19,8 @@ def _request_callback( ) -> Any: if method == "apps_v1_api.list_deployment_for_all_namespaces": if self.empty_response is True: - return MockResponse([]) - return MockResponse(["apple", "banana", "cherry"]) + return V1DeploymentList([]) + return V1DeploymentList(["apple", "banana", "cherry"]) if method == "core_v1_api.list_namespace": return self._mock_list_namespace() @@ -79,7 +79,7 @@ def test_namespaces_fails(self) -> None: handler_instance.preflight() -# Create a Mock respons object -class MockResponse: +# Create a Mock respons for the V1DeploymentList object +class V1DeploymentList: def __init__(self, items: List[str]) -> None: self.items = items