

def test_stop_servers(self):
    call_info = {
        'stopped': [],
    }

    class FakeRPCServer(object):

        def stop(self):
            call_info['stopped'].append(self)
    fake_servers = [FakeRPCServer() for x in range(5)]
    self.driver.rpc_servers = fake_servers
    self.driver.stop_servers()
    self.assertEqual(fake_servers, call_info['stopped'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/cells/test_cells_rpc_driver.py CellsRPCDriverTestCase.test_stop_servers/original