# 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
'''Tets for the configuration class'''



def test_init_configfile():
    '''Tests :py:method:`Config.from_configfile` static method.'''
    conf = _config.Config.from_configfile(configfile=ctxt.TEST_CFG)
    assert conf['connector'] == 'activemq'


def test_default_identity():
    '''Tests :py:method:`Congfig.__init__` no identity'''
    _ctxt = ctxt.DEFAULT_CTXT.copy()
    del _ctxt['identity']

# 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

'''Tets for the configuration class'''



def test_init_configfile():
    '''Tests :py:method:`Config.from_configfile` static method.'''
    conf = _config.Config.from_configfile(configfile=ctxt.TEST_CFG)
    assert conf['connector'] == 'activemq'


def test_default_identity():
    '''Tests :py:method:`Congfig.__init__` no identity'''
    _ctxt = ctxt.DEFAULT_CTXT.copy()
    del _ctxt['identity']

    conf = _config.Config(_ctxt)