def test_cmdline_v1(): cmd_line = CmdLine(context_wrap(CMDLINE_V1)) assert cmd_line.get('ro') == [True] assert cmd_line.get('root') == ['/dev/mapper/vg_rootvg-lv_root'] assert cmd_line.get('rd_LVM_LV') == [ 'vg_rootvg/lv_root', 'vg_rootvg/lv_swap' ] # Handle non-alphabet characters and extra spaces assert cmd_line['crashkernel'] == ['191M@0M'] assert cmd_line.get('audit') == [True, '1']
def test_cmdline_v2(): cmd_line = CmdLine(context_wrap(CMDLINE_V2)) assert cmd_line.get('audit') == ['1', '0', True, True] assert cmd_line.cmdline == CMDLINE_V2