From c1b9750501fb00f1cdec24566d76863ead030776 Mon Sep 17 00:00:00 2001 From: Samuel Henrique Date: Sat, 17 Dec 2022 19:11:39 +0000 Subject: [PATCH] Fix test_def_link tests by adding missing mock to open() call The mock was setup to only return the mocked data once, but the function is called twice under cfg_yaml.py, and it breaks at __yaml_load as there's no mock anymore. --- tests/test_yamlcfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_yamlcfg.py b/tests/test_yamlcfg.py index 366a63a..2713ef7 100644 --- a/tests/test_yamlcfg.py +++ b/tests/test_yamlcfg.py @@ -90,6 +90,7 @@ profiles: '''.format(cfgstring) mock_open.side_effect = [ + unittest.mock.mock_open(read_data=data).return_value, unittest.mock.mock_open(read_data=data).return_value ] mock_exists.return_value = True