def test_attach_volumes(self): self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) self.useFixture(mockpatch.PatchObject(javelin, "_get_volume_by_name", return_value=self.fake_object.volume)) self.useFixture(mockpatch.PatchObject(javelin, "_get_server_by_name", return_value=self.fake_object.server)) javelin.attach_volumes([self.fake_object]) mocked_function = self.fake_client.volumes.attach_volume mocked_function.assert_called_once_with( self.fake_object.volume["id"], self.fake_object.server["id"], self.fake_object["device"] )
def test_attach_volumes(self): self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) self.useFixture(mockpatch.PatchObject( javelin, "_get_volume_by_name", return_value=self.fake_object.volume)) self.useFixture(mockpatch.PatchObject( javelin, "_get_server_by_name", return_value=self.fake_object.server)) javelin.attach_volumes([self.fake_object]) mocked_function = self.fake_client.volumes.attach_volume mocked_function.assert_called_once_with( self.fake_object.volume['id'], self.fake_object.server['id'], self.fake_object['device'])
def test_attach_volumes(self): self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) self.useFixture(mockpatch.PatchObject( javelin, "_get_volume_by_name", return_value=self.fake_object.volume)) self.useFixture(mockpatch.PatchObject( javelin, "_get_server_by_name", return_value=self.fake_object.server)) javelin.attach_volumes([self.fake_object]) mocked_function = self.fake_client.volumes.attach_volume mocked_function.assert_called_once_with( self.fake_object.volume['id'], instance_uuid=self.fake_object.server['id'], mountpoint=self.fake_object['device'])