From: kaliko Date: Wed, 5 May 2021 15:58:12 +0000 (+0200) Subject: Fixed test_config X-Git-Tag: 0.18.0~60 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=24bfc0a6fceb390f4b967be0b83d412dcad44ca5;p=mpd-sima.git Fixed test_config 568365b introduced a file acces control on db_file --- 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)