Exemplo n.º 1
0
def vpc_command(argv=None, aws_config=None):
    from acli.commands import vpc as command_vpc
    vpc_res = docopt(command_vpc.__doc__, argv=argv)
    if any((vpc_res.get('ls'), vpc_res.get('list'))):
        vpc.vpc_list(aws_config)
    elif vpc_res.get('info'):
        vpc.vpc_info(aws_config, vpc_id=vpc_res.get('<vpc_id>'))
Exemplo n.º 2
0
def test_vpc_list_service_empty(fake_empty_vpcs, capsys):
    with pytest.raises(SystemExit):
        out, err = capsys.readouterr(vpc_list(aws_config=config))
        assert err == "No VPCs found."
Exemplo n.º 3
0
def test_vpc_list_service_empty(fake_empty_vpcs, capsys):
    with pytest.raises(SystemExit):
        out, err = capsys.readouterr(vpc_list(aws_config=config))
        assert err == "No VPCs found."
Exemplo n.º 4
0
def test_vpc_list_service(fake_vpcs):
    with pytest.raises(SystemExit):
        assert vpc_list(aws_config=config)
Exemplo n.º 5
0
def test_vpc_list_service(fake_vpcs):
    with pytest.raises(SystemExit):
        assert vpc_list(aws_config=config)