From c4ba63b83b3130de9ebd9a1231c884eb70ede6cc Mon Sep 17 00:00:00 2001 From: Jan-Paul van Osta Date: Sun, 11 Dec 2022 16:15:39 +0100 Subject: [PATCH] chatbot and points unittests toegevoegd aan init --- tests/__init__.py | 4 +++- tests/chatbot.py | 2 +- tests/points.py | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tests/points.py diff --git a/tests/__init__.py b/tests/__init__.py index 8d7ef16..4c7fb26 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,4 @@ from .shitpost import TestShitpost -from .general import TestGeneral \ No newline at end of file +from .general import TestGeneral +from .chatbot import TestChatbot +from .points import TestPoints \ No newline at end of file diff --git a/tests/chatbot.py b/tests/chatbot.py index d5cf629..ed6e21f 100644 --- a/tests/chatbot.py +++ b/tests/chatbot.py @@ -8,7 +8,7 @@ from discord.ext import commands import Chatbot -class TestGeneral(unittest.TestCase): +class TestChatbot(unittest.TestCase): def setUp(self): dotenv.load_dotenv() intents = discord.Intents.default() diff --git a/tests/points.py b/tests/points.py new file mode 100644 index 0000000..0d5b7fd --- /dev/null +++ b/tests/points.py @@ -0,0 +1,21 @@ +import unittest +import praw +import dotenv +from datetime import datetime + +import discord +from discord.ext import commands + +import Points + +class TestPoints(unittest.TestCase): + def setUp(self): + dotenv.load_dotenv() + intents = discord.Intents.default() + intents.message_content = True + intents.members = True + bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Stroopwafel. Shitpost bot extraordinaire.', pm_help=True, intents=intents) + self.cog = Points.Points(bot) + + def test_getUserBalance(self): + self.assertEqual(2, 1+1) \ No newline at end of file