From 24bfc0a6fceb390f4b967be0b83d412dcad44ca5 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 5 May 2021 17:58:12 +0200 Subject: [PATCH] Fixed test_config 568365b introduced a file acces control on db_file --- tests/test_config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 99a89f8..36ba2ac 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -15,7 +15,8 @@ class TestConfMan(unittest.TestCase): @patch('sima.utils.config.makedirs') @patch('sima.utils.config.chmod') - def test_XDG_var(self, mock_makedirs, mock_chmod): + @patch('sima.utils.config.ConfMan.control_facc') + def test_XDG_var(self, *args): config_home = '/foo/bar' os.environ['XDG_CONFIG_HOME'] = config_home conf_file = os.path.join(config_home, DIRNAME, CONF_FILE) @@ -28,7 +29,8 @@ class TestConfMan(unittest.TestCase): self.assertEqual(conf.config['sima']['var_dir'], var_dir) @patch('sima.utils.config.isdir') - def test_default_locations(self, mock_isdir): + @patch('sima.utils.config.ConfMan.control_facc') + def test_default_locations(self, mock_isdir, *args): home = '/foo' mock_isdir.return_value = True os.environ.pop('XDG_CONFIG_HOME', None) -- 2.39.2