# Path: pyca/config.py
# def config(*args):
#     '''Get a specific configuration value or the whole configuration, loading
#     the configuration file if it was not before.
# 
#     :param key: optional configuration key to return
#     :type key: string
#     :return: Part of the configuration object containing the configuration
#              or configuration value.
#              If a part of the configuration object (e.g. configobj.Section) is
#              returned, it can be treated like a dictionary.
#              Returning None, if the configuration value is not found.
#     '''
#     cfg = __config or update_configuration()
#     for key in args:
#         if cfg is None:
#             return
#         cfg = cfg.get(key)
#     return cfg


import unittest
from pyca import config
# -*- coding: utf-8 -*-

'''
Tests for pyCA configuration
'''




class TestPycaConfig(unittest.TestCase):

    def test_check(self):
        config.config()['server']['insecure'] = True

# Path: pyca/config.py
# def config(*args):
#     '''Get a specific configuration value or the whole configuration, loading
#     the configuration file if it was not before.
# 
#     :param key: optional configuration key to return
#     :type key: string
#     :return: Part of the configuration object containing the configuration
#              or configuration value.
#              If a part of the configuration object (e.g. configobj.Section) is
#              returned, it can be treated like a dictionary.
#              Returning None, if the configuration value is not found.
#     '''
#     cfg = __config or update_configuration()
#     for key in args:
#         if cfg is None:
#             return
#         cfg = cfg.get(key)
#     return cfg


# Path: tests/test_config.py
import unittest
from pyca import config

# -*- coding: utf-8 -*-

'''
Tests for pyCA configuration
'''




class TestPycaConfig(unittest.TestCase):

    def test_check(self):
        config.config()['server']['insecure'] = True

        config.config()['server']['certificate'] = '/xxx'