Adds test watspelenwe
Test het martijn en het mark gedeelte los.
This commit is contained in:
+22
-1
@@ -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)
|
||||
Reference in New Issue
Block a user