Fix tox cover environment on python 3.6
In python 3.6, os.path.join does not accept Mock objects, giving the following error: TypeError: expected str, bytes or os.PathLike object, not MagicMock Since the switch to use ubuntu bionic for the base image for jobs, python 3.6 is the default for python 3. Change-Id: I79bec585361a54b8303c130a363c62d9a4b7faae Story: 2004959 Task: 30035
This commit is contained in:
parent
d27895d4ba
commit
14bfce8a72
@ -285,7 +285,8 @@ class TestCase(unittest.TestCase):
|
||||
mock_rmtree):
|
||||
parser = argparse.ArgumentParser()
|
||||
parsed_args = parser.parse_args([])
|
||||
dump_dir = mock_mkdtemp.return_value
|
||||
dump_dir = "/path/to/dump"
|
||||
mock_mkdtemp.return_value = dump_dir
|
||||
mock_listdir.return_value = ["host1.yml", "host2.yml"]
|
||||
mock_read.side_effect = [
|
||||
{"var1": "value1"},
|
||||
|
Loading…
Reference in New Issue
Block a user