def test_default_templates_dir_both(self):
     default = '/usr/libexec/os-apply-config/templates'
     deprecated = '/opt/stack/os-apply-config/templates'
     with mock.patch('os.path.isdir', lambda x: (x == default or
                                                 x == deprecated)):
         self.assertEqual(default, apply_config.templates_dir())
 def test_default_templates_dir_old_deprecated(self):
     default = '/opt/stack/os-config-applier/templates'
     with mock.patch('os.path.isdir', lambda x: x == default):
         self.assertEqual(default, apply_config.templates_dir())
 def test_default_templates_dir_current(self):
     default = '/usr/libexec/os-apply-config/templates'
     with mock.patch('os.path.isdir', lambda x: x == default):
         self.assertEqual(default, apply_config.templates_dir())
Beispiel #4
0
 def test_default_templates_dir_both(self):
     default = '/usr/libexec/os-apply-config/templates'
     deprecated = '/opt/stack/os-apply-config/templates'
     with mock.patch('os.path.isdir', lambda x:
                     (x == default or x == deprecated)):
         self.assertEqual(default, apply_config.templates_dir())
Beispiel #5
0
 def test_default_templates_dir_old_deprecated(self):
     default = '/opt/stack/os-config-applier/templates'
     with mock.patch('os.path.isdir', lambda x: x == default):
         self.assertEqual(default, apply_config.templates_dir())
Beispiel #6
0
 def test_default_templates_dir_current(self):
     default = '/usr/libexec/os-apply-config/templates'
     with mock.patch('os.path.isdir', lambda x: x == default):
         self.assertEqual(default, apply_config.templates_dir())