diff options
author | Matt Clay <matt@mystile.com> | 2018-11-26 10:45:22 -0800 |
---|---|---|
committer | Matt Davis <nitzmahone@users.noreply.github.com> | 2018-11-26 10:45:22 -0800 |
commit | bbbfa29cbea29786ac484e8b74c80f1a55faff29 (patch) | |
tree | 61703145a9809c8cf343ccd2567a630b31425065 | |
parent | 03aaf82d422cc6026fab57855d23d27c9d468a70 (diff) | |
download | ansible-bbbfa29cbea29786ac484e8b74c80f1a55faff29.tar.gz |
[stable-2.5] Fix unit test issues with pytest >= 4.0.0. (#48738)
(cherry picked from commit feb5b0b299054af6df0754b4ca441859bec1ac11)
Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r-- | test/units/module_utils/basic/test_argument_spec.py | 4 | ||||
-rw-r--r-- | test/units/modules/packaging/os/conftest.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/units/module_utils/basic/test_argument_spec.py b/test/units/module_utils/basic/test_argument_spec.py index 368d71ad9e..355654090a 100644 --- a/test/units/module_utils/basic/test_argument_spec.py +++ b/test/units/module_utils/basic/test_argument_spec.py @@ -130,9 +130,9 @@ def options_argspec_list(): @pytest.fixture -def options_argspec_dict(): +def options_argspec_dict(options_argspec_list): # should test ok, for options in dict format. - kwargs = options_argspec_list() + kwargs = options_argspec_list kwargs['argument_spec']['foobar']['type'] = 'dict' return kwargs diff --git a/test/units/modules/packaging/os/conftest.py b/test/units/modules/packaging/os/conftest.py index 84742fbb61..f9c464512d 100644 --- a/test/units/modules/packaging/os/conftest.py +++ b/test/units/modules/packaging/os/conftest.py @@ -10,7 +10,7 @@ def get_method_name(request_body): @pytest.fixture def mock_request(request, mocker): - responses = request.getfuncargvalue('testcase')['calls'] + responses = request.getfixturevalue('testcase')['calls'] module_name = request.module.TESTED_MODULE def transport_request(host, handler, request_body, verbose=0): |