From 29fafabeed24edc958ed8acf87f33d1ba03fb3bc Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 19 Dec 2022 16:01:46 +0000 Subject: [PATCH] Remove unnecessary 'self.methods' This was used by 'run_method_with_servers', not the SDK-equivalent. Change-Id: Ia3333a95e406f430beb4f2cfb887e81ab7b72cfe Signed-off-by: Stephen Finucane --- .../tests/unit/compute/v2/test_server.py | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py index 8cb8ceb56b..f412216278 100644 --- a/openstackclient/tests/unit/compute/v2/test_server.py +++ b/openstackclient/tests/unit/compute/v2/test_server.py @@ -5866,16 +5866,11 @@ class TestServerMigrate(TestServer): class TestServerPause(TestServer): def setUp(self): - super(TestServerPause, self).setUp() + super().setUp() # Get the command object to test self.cmd = server.PauseServer(self.app, None) - # Set methods to be tested. - self.methods = { - 'pause': None, - } - def test_server_pause_one_server(self): self.run_method_with_sdk_servers('pause_server', 1) @@ -7524,16 +7519,11 @@ class TestServerRestore(TestServer): class TestServerResume(TestServer): def setUp(self): - super(TestServerResume, self).setUp() + super().setUp() # Get the command object to test self.cmd = server.ResumeServer(self.app, None) - # Set methods to be tested. - self.methods = { - 'resume': None, - } - def test_server_resume_one_server(self): self.run_method_with_sdk_servers('resume_server', 1) @@ -8289,16 +8279,11 @@ class TestServerStop(TestServer): class TestServerSuspend(TestServer): def setUp(self): - super(TestServerSuspend, self).setUp() + super().setUp() # Get the command object to test self.cmd = server.SuspendServer(self.app, None) - # Set methods to be tested. - self.methods = { - 'suspend': None, - } - def test_server_suspend_one_server(self): self.run_method_with_sdk_servers('suspend_server', 1) @@ -8324,16 +8309,11 @@ class TestServerUnlock(TestServer): class TestServerUnpause(TestServer): def setUp(self): - super(TestServerUnpause, self).setUp() + super().setUp() # Get the command object to test self.cmd = server.UnpauseServer(self.app, None) - # Set methods to be tested. - self.methods = { - 'unpause': None, - } - def test_server_unpause_one_server(self): self.run_method_with_sdk_servers('unpause_server', 1)