TestingΒΆ

Often you want to adjust configuration in your tests. Everett facilitates testing by providing an override mechanism.

everett.manager.config_override(**cfg)

Allow you to override config for writing tests.

This can be used as a class decorator:

@config_override(FOO='bar', BAZ='bat')
class FooTestClass(object):
    ...

This can be used as a function decorator:

@config_override(FOO='bar')
def test_foo():
    ...

This can also be used as a context manager:

def test_foo():
    with config_override(FOO='bar'):
        ...