aboutsummaryrefslogtreecommitdiff
path: root/test/util.py
blob: 97566b06d10f92cc86c93dffcdc8e906995f8888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- 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]
bgstack15