Added get and search kahoot-thing

This commit is contained in:
Mawoka
2022-03-08 21:20:53 +01:00
parent 449f227ecc
commit 5c5386fdf8
8 changed files with 313 additions and 126 deletions
+20
View File
@@ -0,0 +1,20 @@
from unittest import IsolatedAsyncioTestCase
from classquiz.kahoot_importer.search import search
class Test(IsolatedAsyncioTestCase):
async def test_search(self):
res = await search(query="Python", limit=100)
self.assertEqual(len(res.entities), 100)
await search(query="Test Quiz", limit=100)
await search(query="Biologie", limit=100)
await search(query="Chemie", limit=100)
await search(query="Deutsch", limit=100)
await search(query="Mathe", limit=100)
await search(query="Englisch", limit=100)
await search(query="Barbie", limit=100)
await search(query="Internet", limit=100)
await search(query="Windows", limit=100)
res2 = await search(query="Python", limit=100)
res2_ids = [str(e.card.uuid) for e in res2.entities]
print(res2_ids)