Merge "Convert apply_result to mock object"
This commit is contained in:
commit
add4d03349
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user