Guard module-level creation of Config objects (#2449)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2019-02-14 15:36:48 +11:00
committed by GitHub
parent ac8b1fc108
commit b1066ad58f
6 changed files with 31 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
import pytest
from redbot.core import bank as bank_module
__all__ = ["bank"]
@@ -9,7 +10,6 @@ def bank(config, monkeypatch):
with monkeypatch.context() as m:
m.setattr(Config, "get_conf", lambda *args, **kwargs: config)
from redbot.core import bank
bank._register_defaults()
return bank
# noinspection PyProtectedMember
bank_module._init()
return bank_module