# Path: fabdeploy/utils.py
# def unprefix_conf(conf, namespaces):
#     for ns in namespaces:
#         for key in conf.keys():
#             if key.startswith(ns):
#                 conf[key[len(ns):]] = conf[key]


from fabdeploy.utils import unprefix_conf


def test_unprefix_conf():
    conf = {'module__foo': 'module', 'foo': 'bar'}
    unprefix_conf(conf, ['module__'])

# Path: fabdeploy/utils.py
# def unprefix_conf(conf, namespaces):
#     for ns in namespaces:
#         for key in conf.keys():
#             if key.startswith(ns):
#                 conf[key[len(ns):]] = conf[key]


# Path: tests/test_utils.py
from fabdeploy.utils import unprefix_conf



def test_unprefix_conf():
    conf = {'module__foo': 'module', 'foo': 'bar'}
    unprefix_conf(conf, ['module__'])

    assert conf['foo'] == 'module'