def ami_command(argv=None, aws_config=None): from acli.commands import ami as command_ami ami_res = docopt(command_ami.__doc__, argv=argv) if any((ami_res.get('ls'), ami_res.get('list'))): ec2.ami_list(aws_config, filter_term=ami_res.get('--filter')) elif ami_res.get('info'): ec2.ami_info(aws_config, ami_id=ami_res.get('<ami_id>'))
def test_ami_list_service(amis): with pytest.raises(SystemExit): assert ami_list(aws_config=config)