[V3 DataConverter] Fix past nicks conversion for mod (#1840)

* Fix existing tests permanently modifying attributes

* Add dataconverter tests file

* Fix past nicks spec converter

* Update gitignore for dataconverter data files

* Add data file for dataconverter test

* Simplify fix
This commit is contained in:
Will
2018-06-09 20:27:06 -04:00
committed by GitHub
parent a070dffb93
commit 470521f7c8
8 changed files with 104 additions and 30 deletions

View File

@@ -2,15 +2,15 @@ import pytest
@pytest.fixture()
def bank(config):
def bank(config, monkeypatch):
from redbot.core import Config
Config.get_conf = lambda *args, **kwargs: config
with monkeypatch.context() as m:
m.setattr(Config, "get_conf", lambda *args, **kwargs: config)
from redbot.core import bank
from redbot.core import bank
bank._register_defaults()
return bank
bank._register_defaults()
return bank
@pytest.mark.asyncio