]> kaliko git repositories - mpd-sima.git/commitdiff
Fixed test_config
authorkaliko <kaliko@azylum.org>
Wed, 5 May 2021 15:58:12 +0000 (17:58 +0200)
committerkaliko <kaliko@azylum.org>
Fri, 7 May 2021 16:24:36 +0000 (18:24 +0200)
568365b introduced a file acces control on db_file

tests/test_config.py

index 99a89f8964918784a7abdbc4735d50f6605391a1..36ba2accf0bf9d5da101acfd1cb6b40f439720fe 100644 (file)
@@ -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)