Skip to content

Commit

Permalink
fix: changing name of response mock to V1DeploymentList
Browse files Browse the repository at this point in the history
Signed-off-by: Boekhorst <[email protected]>
  • Loading branch information
boekhorstb1 committed Sep 10, 2024
1 parent 8fe348d commit 69140d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/modules/test_k8s_prerequisites_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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

0 comments on commit 69140d5

Please sign in to comment.