This commit is contained in:
retoor 2025-07-04 20:07:58 +02:00
parent 1a7cc682f6
commit 5377b3c647

6
ads.py
View File

@ -10,7 +10,7 @@ from types import SimpleNamespace
import asyncio
class AsyncDataSetConnector:
class AsyncDataSet:
_KV_TABLE = "__kv_store"
@ -249,13 +249,13 @@ class AsyncDataSetConnector:
return default
class TestAsyncDataSetConnector(unittest.IsolatedAsyncioTestCase):
class TestAsyncDataSet(unittest.IsolatedAsyncioTestCase):
async def asyncSetUp(self):
self.db_path = Path("temp_test.db")
if self.db_path.exists():
self.db_path.unlink()
self.connector = AsyncDataSetConnector(str(self.db_path))
self.connector = AsyncDataSet(str(self.db_path))
async def test_insert_and_get(self):
await self.connector.insert("people", {"name": "John Doe", "age": 30})