def filter(config): """The subset of configuration keys to be made public.""" keys = ['myapp.hello', 'myapp.some.deeply.nested.value', 'myapp.oz'] return filter_dict(config, keys)
def test_filter(self): """Ensure that the subset of A is filtered out using keys""" a = DotDict(a=1, b=1) keys = ['a'] b = filter_dict(a, keys) self.assertEqual(b, {'a': 1})
def filter(config): """The subset of configuration keys to be made public.""" keys = ["myapp.hello", "myapp.some.deeply.nested.value", "myapp.oz"] return filter_dict(config, keys)