By default, mock.patch's autospec argument is None, meaning that
there's no signature checking for the patched methods and functions.
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.
Reviewed: https:/ /review. opendev. org/470775 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1eec451b1ba 254ec4c43c77f79 b0d2809d6cb9a5
Committed: https:/
Submitter: Zuul
Branch: master
commit 1eec451b1ba254e c4c43c77f79b0d2 809d6cb9a5
Author: Takashi NATSUME <email address hidden>
Date: Mon Aug 19 18:11:48 2019 +0900
Tests: autospecs all the mock.patch usages
By default, mock.patch's autospec argument is None, meaning that
there's no signature checking for the patched methods and functions.
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.
Co-Authored-By: Claudiu Belu <email address hidden> dde3d88855eabe7 545784f365e
Change-Id: I4484e63c97bd1c
Closes-Bug: #1735588