def assertBootEnv(self, expected, config=None, board='beagle'): """Helper function the boot env parameters. :param config: The string containing the YAML configuration. :type str :param expected: The expected configuration. :type dict :param board: The name of the board to test. Defaults to beagle. :type str """ board_conf = get_board_config(board) if config: name = self.useFixture(CreateTempFileFixture(config)).\ get_file_name() board_conf.from_file(name) self.assertEqual(expected, board_conf._get_boot_env(consoles=[]))
def setUp(self): super(TestAndroidBoardsHwpack, self).setUp() # Pick a default board. self.config = get_board_config('beagle')
def test_hwpack_not_exists(self): instance = get_board_config('beagle') self.assertRaises(BoardConfigException, instance.from_file, 'a_file')
def test_get_board_config(self): instance = get_board_config('beagle') self.assertIsInstance(instance, AndroidBeagleConfig)