def parse_device(rule):
    parser = argparse.ArgumentParser()
    rules = shlex.split(rule)
    rules.pop(0)
    modulename = rules.pop(0)
    parser.add_argument('--opts', dest='opts', action='store')

    args = clean_args(vars(parser.parse_args(rules)))
    args['modulename'] = modulename
    parser = None
    return args
Confirm the expected list of calls matches the mock call.
dataset/ETHPy150Open saltstack/salt/salt/utils/kickstart.py/parse_device--crossover with--dataset/ETHPy150Open jacebrowning/gitman/gitman/test/__init__.py/assert_calls