示例#1
0
 def setup(self):
     self.xml_state = mock.MagicMock()
     self.xml_state.build_type.get_filesystem = mock.Mock(
         return_value='ext3')
     self.setup = SystemSetup(self.xml_state, 'description_dir', 'root_dir')
     description = XMLDescription('../data/example_config.xml')
     self.setup_with_real_xml = SystemSetup(XMLState(description.load()),
                                            'description_dir', 'root_dir')
     command_run = namedtuple('command', ['output', 'error', 'returncode'])
     self.run_result = command_run(output='password-hash',
                                   error='stderr',
                                   returncode=0)