Fix bug in serverprovider.test_openstack_provider

OpenStackProviderTestCase.test_openstack_provider_create_vms was fixed
by correct mocking.

Change-Id: I78810dacdc6f18d808926a0f984d98c4b663d158
Closes-Bug: #1259249
This commit is contained in:
Maksym Iarmak 2013-12-11 19:11:28 +02:00
parent 3a60bd6b9b
commit 84d1f2f698

View File

@ -129,7 +129,9 @@ class OpenStackProviderTestCase(test.TestCase):
@mock.patch(MOD_NAME + '.open', create=True)
@mock.patch(MOD_NAME + '.provider')
@mock.patch('rally.benchmark.utils.get_from_manager')
def test_openstack_provider_create_vms(self, get, g, provider, clients):
@mock.patch('time.sleep')
def test_openstack_provider_create_vms(self, mock_sleep, get, g, provider,
clients):
get.return_value = lambda r: r
self._init_mock_clients()
clients.Clients = mock.MagicMock(return_value=self.clients)