Adds test watspelenwe

Test het martijn en het mark gedeelte los.
This commit is contained in:
2022-12-04 21:07:59 +01:00
parent e8df92be23
commit 7c29180ca4
2 changed files with 38 additions and 18 deletions
+22 -1
View File
@@ -1,6 +1,8 @@
import unittest
import dotenv
import os
import discord
import requests
from discord.ext import commands
import Shitpost
@@ -24,4 +26,23 @@ class TestShitpost(unittest.TestCase):
basic_review = self.cog.get_review_string()
with self.subTest(msg=f"Review does not return a string"):
self.assertIsInstance(basic_review, str)
self.assertIsInstance(basic_review, str)
def test_watspelenwe_sass(self):
once = self.cog.get_watspelenwe_sass()
twice = self.cog.get_watspelenwe_sass()
with self.subTest(msg="Watspelenwe does not seed correctly"):
self.assertEqual(once, twice)
with self.subTest(msg="Watspelenwe does not return a string"):
self.assertIsInstance(once, str)
def test_watspelenwe_cal(self):
data = requests.get(os.getenv('STROOP_CALDAV_CAL'))
if not data:
self.skipTest(f"Server at {self.cog.muzak_url} has an error, or is unavailable")
(activiteit, reden) = self.cog.get_watspelenwe_cal()
with self.subTest(msg="Watspelenwe activiteit does not return a string"):
self.assertIsInstance(activiteit, str)
with self.subTest(msg="Watspelenwe reden does not return a string"):
self.assertIsInstance(reden, str)