Started creating config file system
This commit is contained in:
17
tests/quiz_test.py
Normal file
17
tests/quiz_test.py
Normal 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]")
|
||||
Reference in New Issue
Block a user