En refactor, want hoe het stond was niet heel testbaar
This commit is contained in:
+17
-1
@@ -45,4 +45,20 @@ class TestShitpost(unittest.TestCase):
|
||||
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)
|
||||
self.assertIsInstance(reden, str)
|
||||
|
||||
def test_ktdm(self):
|
||||
with self.subTest():
|
||||
wit = ["qwerty", "yuiop"]
|
||||
kaart = self.cog.get_ktdm(wit)
|
||||
self.assertIn(wit[0], kaart)
|
||||
self.assertIn(wit[1], kaart)
|
||||
with self.subTest():
|
||||
wit = ["a", "b", "c", "d"]
|
||||
kaart = self.cog.get_ktdm(wit)
|
||||
self.assertEqual(kaart, None)
|
||||
with self.subTest():
|
||||
wit = ["a", "b", "c"]
|
||||
self.cog.zwarte_lijst = ["___"]
|
||||
kaart = self.cog.get_ktdm(wit)
|
||||
self.assertEqual(kaart, None)
|
||||
Reference in New Issue
Block a user