changes in test
This commit is contained in:
@@ -11,7 +11,7 @@ from bot.lib.CogsPrep import cog_list, work_with_cogs
|
||||
|
||||
|
||||
def test_cog_list():
|
||||
with mock.patch('lib.CogsPrep.listdir') as MockClass:
|
||||
with mock.patch('bot.lib.CogsPrep.listdir') as MockClass:
|
||||
MockClass.return_value = ['cog1.py', 'cog2.py']
|
||||
result = cog_list()
|
||||
assert result == ['cog1', 'cog2']
|
||||
@@ -21,7 +21,7 @@ def test_cog_list():
|
||||
@pytest.mark.parametrize("cog", ["cog1.py", "cog2"])
|
||||
@pytest.mark.parametrize("what_do", ['load', 'unload', 'reload', 'disable', 'enable'])
|
||||
async def test_work_with_cogs(what_do, cog):
|
||||
with (mock.patch('lib.CogsPrep.rename') as mock_rename):
|
||||
with (mock.patch('bot.lib.CogsPrep.rename') as mock_rename):
|
||||
mock_rename.return_value = None
|
||||
mock_bot = mock.MagicMock(spec=CommonBotBase)
|
||||
result = await work_with_cogs(what_do, mock_bot, cog)
|
||||
|
||||
Reference in New Issue
Block a user