Toby Harradine b1066ad58f
Guard module-level creation of Config objects (#2449)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-14 15:36:48 +11:00

16 lines
368 B
Python

import pytest
from redbot.core import bank as bank_module
__all__ = ["bank"]
@pytest.fixture()
def bank(config, monkeypatch):
from redbot.core import Config
with monkeypatch.context() as m:
m.setattr(Config, "get_conf", lambda *args, **kwargs: config)
# noinspection PyProtectedMember
bank_module._init()
return bank_module