# Path: pymco/config.py
# LOG = logging.getLogger(__name__)
# INFINITE = 9999999999999999999
# def lookup_with_default(fnc):
#     def decorator(self, name, *args, **kwargs):
#     def __init__(self, configdict, logger=LOG):
#     def __len__(self):
#     def __iter__(self):
#     def __getitem__(self, key):
#     def get(self, key):
#     def getint(self, key):
#     def getfloat(self, key):
#     def getboolean(self, key):
#     def get_connector(self):
#     def get_security(self):
#     def get_serializer(self, key):
#     def get_host_and_ports(self):
#     def get_user_and_password(self, current_host_and_port=None):
#     def get_ssl_params(self):
#     def get_conn_params(self):
#     def from_configfile(configfile):
#     def from_configstr(configstr, section='default'):
# class Config(collections.Mapping):
# 
# Path: pymco/exc.py
# class PyMcoException(Exception):
# class ImproperlyConfigured(PyMcoException):
# class ConfigLookupError(PyMcoException):
# class BadFilterFactOperator(PyMcoException):
# class TimeoutError(PyMcoException):
# class VerificationError(PyMcoException):
# 
# Path: pymco/test/utils.py
# def get_template(name, package=__package__):
# def configfile(ctxt=None):


import pytest
from pymco import config as _config
from pymco import exc
from pymco.test import ctxt
from pymco.test.utils import mock
                         {'activemq': 'connector.foo.FooConnector'}):
        assert config.get_connector() == import_object.return_value
        import_object.assert_called_once_with('connector.foo.FooConnector',
                                              config=config)


@mock.patch('pymco.utils.import_object')
def test_get_security(import_object, config):
    with mock.patch.dict('pymco.security.SecurityProvider.plugins',
                         {'ssl': 'security.foo.FooProvider'}):
        assert config.get_security() == import_object.return_value
        import_object.assert_called_once_with('security.foo.FooProvider',
                                              config=config)


@mock.patch('pymco.utils.import_object')
def test_get_serializer(import_object, config):
    with mock.patch.dict('pymco.serializers.SerializerBase.plugins',
                         {'yaml': 'serializer.foo.FooSerializer'}):
        assert config.get_serializer('plugin.ssl_serializer'
                                     ) == import_object.return_value
        import_object.assert_called_once_with('serializer.foo.FooSerializer')


def test_get_host_and_ports(config):
    assert config.get_host_and_ports() == [('localhost', 6163),
                                           ('localhost', 6164)]


def test_get_host_and_ports_stomp(config):

# Path: pymco/config.py
# LOG = logging.getLogger(__name__)
# INFINITE = 9999999999999999999
# def lookup_with_default(fnc):
#     def decorator(self, name, *args, **kwargs):
#     def __init__(self, configdict, logger=LOG):
#     def __len__(self):
#     def __iter__(self):
#     def __getitem__(self, key):
#     def get(self, key):
#     def getint(self, key):
#     def getfloat(self, key):
#     def getboolean(self, key):
#     def get_connector(self):
#     def get_security(self):
#     def get_serializer(self, key):
#     def get_host_and_ports(self):
#     def get_user_and_password(self, current_host_and_port=None):
#     def get_ssl_params(self):
#     def get_conn_params(self):
#     def from_configfile(configfile):
#     def from_configstr(configstr, section='default'):
# class Config(collections.Mapping):
# 
# Path: pymco/exc.py
# class PyMcoException(Exception):
# class ImproperlyConfigured(PyMcoException):
# class ConfigLookupError(PyMcoException):
# class BadFilterFactOperator(PyMcoException):
# class TimeoutError(PyMcoException):
# class VerificationError(PyMcoException):
# 
# Path: pymco/test/utils.py
# def get_template(name, package=__package__):
# def configfile(ctxt=None):


# Path: tests/unit/test_config.py
import pytest
from pymco import config as _config
from pymco import exc
from pymco.test import ctxt
from pymco.test.utils import mock

                         {'activemq': 'connector.foo.FooConnector'}):
        assert config.get_connector() == import_object.return_value
        import_object.assert_called_once_with('connector.foo.FooConnector',
                                              config=config)


@mock.patch('pymco.utils.import_object')
def test_get_security(import_object, config):
    with mock.patch.dict('pymco.security.SecurityProvider.plugins',
                         {'ssl': 'security.foo.FooProvider'}):
        assert config.get_security() == import_object.return_value
        import_object.assert_called_once_with('security.foo.FooProvider',
                                              config=config)


@mock.patch('pymco.utils.import_object')
def test_get_serializer(import_object, config):
    with mock.patch.dict('pymco.serializers.SerializerBase.plugins',
                         {'yaml': 'serializer.foo.FooSerializer'}):
        assert config.get_serializer('plugin.ssl_serializer'
                                     ) == import_object.return_value
        import_object.assert_called_once_with('serializer.foo.FooSerializer')


def test_get_host_and_ports(config):
    assert config.get_host_and_ports() == [('localhost', 6163),
                                           ('localhost', 6164)]


def test_get_host_and_ports_stomp(config):

    with mock.patch.dict(config.config, {'connector': 'stomp',