-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbot_tests.py
More file actions
32 lines (23 loc) · 722 Bytes
/
Copy pathbot_tests.py
File metadata and controls
32 lines (23 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import asyncio
import discord.ext.test as dpytest
from byoctf_discord import bot
async def test_view_1():
dpytest.configure(bot)
await dpytest.message("!v 1")
assert (
dpytest.verify()
.message()
.contains()
.content("challenge doesn't exist or isn't unlocked yet")
)
async def test_view_5():
dpytest.configure(bot)
await dpytest.message("!v 5")
assert dpytest.verify().message().contains().content("Title: challenge 5")
async def test_whoami():
dpytest.configure(bot)
await dpytest.message("!whoami")
assert dpytest.verify().message().content("Hello World!")
asyncio.run(test_view_1())
asyncio.run(test_view_5())
asyncio.run(test_whoami())