# Path: cloudify_agent/installer/exceptions.py
# class AgentInstallerConfigurationError(exceptions.NonRecoverableError):
#     def __init__(self, msg):


from mock import Mock, patch
from cloudify_agent.installer import exceptions
    from cloudify_agent.installer.runners.fabric_runner import FabricRunner
    from cloudify_agent.installer.runners.fabric_runner import (
        FabricCommandExecutionException,
    )
import pytest
        user='user',
        host='host',
        password='password')
    assert runner.port == 22


@pytest.mark.only_posix
def test_no_host():
    with pytest.raises(exceptions.AgentInstallerConfigurationError,
                       match='.*Missing host.*'):
        FabricRunner(
            validate_connection=False,
            user='user',
            password='password'
        )


@pytest.mark.only_posix
def test_no_user():
    with pytest.raises(exceptions.AgentInstallerConfigurationError,
                       match='.*Missing user.*'):
        FabricRunner(
            validate_connection=False,
            host='host',
            password='password',
        )


@pytest.mark.only_posix
def test_no_key_no_password():

# Path: cloudify_agent/installer/exceptions.py
# class AgentInstallerConfigurationError(exceptions.NonRecoverableError):
#     def __init__(self, msg):


# Path: cloudify_agent/tests/installer/runners/test_fabric_runner.py
from mock import Mock, patch
from cloudify_agent.installer import exceptions
    from cloudify_agent.installer.runners.fabric_runner import FabricRunner
    from cloudify_agent.installer.runners.fabric_runner import (
        FabricCommandExecutionException,
    )
import pytest

        user='user',
        host='host',
        password='password')
    assert runner.port == 22


@pytest.mark.only_posix
def test_no_host():
    with pytest.raises(exceptions.AgentInstallerConfigurationError,
                       match='.*Missing host.*'):
        FabricRunner(
            validate_connection=False,
            user='user',
            password='password'
        )


@pytest.mark.only_posix
def test_no_user():
    with pytest.raises(exceptions.AgentInstallerConfigurationError,
                       match='.*Missing user.*'):
        FabricRunner(
            validate_connection=False,
            host='host',
            password='password',
        )


@pytest.mark.only_posix
def test_no_key_no_password():

    with pytest.raises(exceptions.AgentInstallerConfigurationError,