Fix unit test issues with pytest >= 4.0.0.

This commit is contained in:
Matt Clay 2018-11-14 17:41:15 -08:00
parent 83f27b57fc
commit feb5b0b299
2 changed files with 3 additions and 3 deletions

View file

@ -130,9 +130,9 @@ def options_argspec_list():
@pytest.fixture @pytest.fixture
def options_argspec_dict(): def options_argspec_dict(options_argspec_list):
# should test ok, for options in dict format. # should test ok, for options in dict format.
kwargs = options_argspec_list() kwargs = options_argspec_list
kwargs['argument_spec']['foobar']['type'] = 'dict' kwargs['argument_spec']['foobar']['type'] = 'dict'
return kwargs return kwargs

View file

@ -10,7 +10,7 @@ def get_method_name(request_body):
@pytest.fixture @pytest.fixture
def mock_request(request, mocker): def mock_request(request, mocker):
responses = request.getfuncargvalue('testcase')['calls'] responses = request.getfixturevalue('testcase')['calls']
module_name = request.module.TESTED_MODULE module_name = request.module.TESTED_MODULE
def transport_request(host, handler, request_body, verbose=0): def transport_request(host, handler, request_body, verbose=0):