Merge "Convert apply_result to mock object"

This commit is contained in:
Zuul 2020-02-19 18:29:37 +00:00 committed by Gerrit Code Review
commit add4d03349
1 changed files with 2 additions and 3 deletions

View File

@ -13,7 +13,6 @@
# limitations under the License.
import binascii
import multiprocessing
import os
import time
@ -1841,10 +1840,10 @@ class TestGenericHardwareManager(base.IronicAgentTest):
internal_info['disk_erasure_concurrency'] = 10
mocked_dispatch.return_value = 'erased device'
apply_result = multiprocessing.pool.ApplyResult
apply_result = mock.Mock()
apply_result._success = True
apply_result._ready = True
apply_result.get = lambda: 'erased device'
apply_result.get.return_value = 'erased device'
mocked_async.return_value = apply_result
blkdev1 = hardware.BlockDevice('/dev/sdj', 'big', 1073741824, True)