By default, mock.patch's autospec argument is None, meaning that
there's no signature checking for the patched methods and funtions.
oslotest.mock_fixture.patch_mock_module fixes a few issues within
mock.patch functions, as well as setting autospec=True by default,
unless otherwise specified or new_callable, create, spec arguments
are passed in.
Updates HyperVBaseTestCase to autospec the classes used by different
*Ops classes.
Reviewed: https:/ /review. openstack. org/539908 /git.openstack. org/cgit/ openstack/ compute- hyperv/ commit/ ?id=26c91401ee8 f203d74261a6b0c 67196173ef57d6
Committed: https:/
Submitter: Zuul
Branch: master
commit 26c91401ee8f203 d74261a6b0c6719 6173ef57d6
Author: Claudiu Belu <email address hidden>
Date: Tue Jan 30 03:48:37 2018 -0800
tests: autospecs mock.patch and classes usages
By default, mock.patch's autospec argument is None, meaning that
there's no signature checking for the patched methods and funtions.
oslotest. mock_fixture. patch_mock_ module fixes a few issues within
mock.patch functions, as well as setting autospec=True by default,
unless otherwise specified or new_callable, create, spec arguments
are passed in.
Updates HyperVBaseTestCase to autospec the classes used by different
*Ops classes.
Change-Id: Ifbdc185d0b50e2 9c5d5f3ff036141 253d2323076
Partial-Bug: #1735588