SynchronousThreadPoolExecutorFixture mock spec does not work
Bug #1823278 reported by
melanie witt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
melanie witt |
Bug Description
The fixture's fake submit() method returns a mocked future that is intended to be a Mock with spec=futurist.
self.
executor = futurist.
future = executor.
result = future.result()
raises the following error:
AttributeError: Mock object has no attribute 'result'
The mock spec just needs to be changed from a string to a class or instance.
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/650171
Review: https:/