Exemple #1
0
def test_backend_parameters_all():
    with mock.patch('sys.stdout', new_callable=StringIO) as out:
        backend_parameters()
    assert "host:" in out.getvalue()
    if "boto3" in external_versions:
        assert "aws_ec2" in out.getvalue()
    else:
        assert "aws_ec2" not in out.getvalue()
Exemple #2
0
def test_backend_parameters_unknown_resource():
    with swallow_logs(new_level=logging.WARNING) as log:
        backend_parameters(["i'm-unknown"])
        assert "Failed to import" in log.out
Exemple #3
0
def test_backend_parameters_with_arg():
    with mock.patch('sys.stdout', new_callable=StringIO) as out:
        backend_parameters(["ssh"])
    assert "host:" in out.getvalue()
    assert "image:" not in out.getvalue()
    assert "aws_ec2" not in out.getvalue()
Exemple #4
0
def test_backend_parameters_all():
    with mock.patch('sys.stdout', new_callable=StringIO) as out:
        backend_parameters()
    assert "host:" in out.getvalue()
    assert "aws_ec2" in out.getvalue()