ktdm test
continuous-integration/drone/push Build is passing

En refactor, want hoe het stond was niet heel testbaar
This commit is contained in:
2022-12-05 02:11:56 +01:00
parent 19d71e3b4c
commit a9de2ab753
2 changed files with 47 additions and 37 deletions
+17 -1
View File
@@ -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)