Merge "Add unit tests for "server stop" command."

This commit is contained in:
Jenkins 2015-11-26 20:25:55 +00:00 committed by Gerrit Code Review
commit 8d523266fc
1 changed files with 20 additions and 0 deletions

View File

@ -819,6 +819,26 @@ class TestServerStart(TestServer):
self.run_method_with_servers('start', 3)
class TestServerStop(TestServer):
def setUp(self):
super(TestServerStop, self).setUp()
# Get the command object to test
self.cmd = server.StopServer(self.app, None)
# Set methods to be tested.
self.methods = {
'stop': None,
}
def test_server_stop_one_server(self):
self.run_method_with_servers('stop', 1)
def test_server_stop_multi_servers(self):
self.run_method_with_servers('stop', 3)
class TestServerSuspend(TestServer):
def setUp(self):