Started creating config file system

This commit is contained in:
2020-11-20 21:01:41 +01:00
parent ae2e63da56
commit 60d6bd2c40
3 changed files with 63 additions and 0 deletions

17
tests/quiz_test.py Normal file
View File

@@ -0,0 +1,17 @@
from bots.discordbot import DiscordBot
import discord.ext.test as dpytest
import pytest
@pytest.mark.asyncio
async def test_bot():
bot = DiscordBot("config.yaml")
# Load any extensions/cogs you want to in here
dpytest.configure(bot.get_client())
config = dpytest.get_config()
channel = config.channels[0]
user = dpytest.backend.make_user("test", 1, 1)
member = dpytest.backend.make_member(user, config.guilds[0])
guild = config.guilds[0]
await dpytest.message("hallo", channel, member)
dpytest.verify_message("[Expected help output]")