jdupouy_radicale3-auth-ldap/test/util.py
2021-04-07 00:52:54 -03:00

17 lines
398 B
Python

# -*- coding: utf-8 -*-
from collections.abc import Mapping
class ConfigMock:
def __init__(self, configuration):
assert isinstance(configuration, Mapping)
assert all(isinstance(x, Mapping) for x in configuration.values())
self.configuration = configuration
def get(self, a, b):
return self.configuration[a][b]
def copy(self, c):
return self