Fix multiprocessing call in unit test

This patch fixes the call to ApplyResult from the multiprocessing
pool module.
The error presents itself more clearly when running tests using
Python 3.8, and that's why it's not been noticed so far.
The change in behavior in Python 3.8 will raise the error:
AttributeError: 'dict' object has no attribute '_cache'

Change-Id: I6717ebf5fef0d32120c9386ab8e47cc81f328493
This commit is contained in:
Riccardo Pittau 2020-01-20 17:04:02 +01:00
parent 4b602771e9
commit 5380945642
1 changed files with 1 additions and 1 deletions

View File

@ -1830,7 +1830,7 @@ class TestGenericHardwareManager(base.IronicAgentTest):
internal_info['disk_erasure_concurrency'] = 10
mocked_dispatch.return_value = 'erased device'
apply_result = multiprocessing.pool.ApplyResult({}, None, None)
apply_result = multiprocessing.pool.ApplyResult
apply_result._success = True
apply_result._ready = True
apply_result.get = lambda: 'erased device'