From ab6fde482dd0841dd4d5e7368a1199d2efc5b7b2 Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Thu, 9 Nov 2023 16:09:13 +0100 Subject: [PATCH] fix: duplicated code + --- .gitignore | 6 +++++- massa_test_framework/node.py | 25 ++++--------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index b6829a9..d493c67 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,8 @@ massa_test_framework.egg-info doc/_build # IDE -.idea \ No newline at end of file +.idea +.vscode + +kubeconfig* + diff --git a/massa_test_framework/node.py b/massa_test_framework/node.py index 7d49caf..101b244 100644 --- a/massa_test_framework/node.py +++ b/massa_test_framework/node.py @@ -485,11 +485,11 @@ def query_state(self, query_state_request: QueryStateRequest) -> QueryStateRespo ) return query_state_response - def grpc_get_stakers(self) -> GetStakersResponse: - """gRPC GetStakers. + def get_stakers_grpc(self) -> GetStakersResponse: + """Queries the gRPC GetStakers method. - Example:: - res = node.grpc_get_stakers() + Example: + res = node.get_stakers_grpc() print(res.stakers) """ @@ -501,23 +501,6 @@ def grpc_get_stakers(self) -> GetStakersResponse: ) return get_stakers_response - - def grpc_get_status(self) -> GetStatusResponse: - """gRPC GetStatus. - - Example:: - res = node.grpc_get_status() - print(res.status) - - """ - - get_status_response: GetStatusResponse = asyncio.run( - self._public_grpc_call( - self.grpc_host, self.pub_grpc_port, "get_status", GetStatusRequest() - ) - ) - - return get_status_response def wait_ready(self, timeout=20) -> None: """Wait for node to be ready