Esempio n. 1
0
 def test__get_attribute_raises_on_invalid_structure(self, mock_Cli):
     cli = Mock()
     cli.get_global_args.return_value = {}
     mock_Cli.return_value = cli
     with patch.dict('os.environ', {'HOME': '../data/kiwi_config/broken'}):
         runtime_config = RuntimeConfig(reread=True)
         with raises(KiwiRuntimeConfigFormatError):
             runtime_config._get_attribute('foo', 'bar')
Esempio n. 2
0
 def test__get_attribute_raises_on_invalid_structure(self):
     with patch.dict('os.environ', {'HOME': '../data/kiwi_config/broken'}):
         runtime_config = RuntimeConfig(reread=True)
         with raises(KiwiRuntimeConfigFormatError):
             runtime_config._get_attribute('foo', 'bar')