UPdate.
This commit is contained in:
parent
1a7cc682f6
commit
5377b3c647
6
ads.py
6
ads.py
@ -10,7 +10,7 @@ from types import SimpleNamespace
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|
||||||
class AsyncDataSetConnector:
|
class AsyncDataSet:
|
||||||
|
|
||||||
_KV_TABLE = "__kv_store"
|
_KV_TABLE = "__kv_store"
|
||||||
|
|
||||||
@ -249,13 +249,13 @@ class AsyncDataSetConnector:
|
|||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
class TestAsyncDataSetConnector(unittest.IsolatedAsyncioTestCase):
|
class TestAsyncDataSet(unittest.IsolatedAsyncioTestCase):
|
||||||
|
|
||||||
async def asyncSetUp(self):
|
async def asyncSetUp(self):
|
||||||
self.db_path = Path("temp_test.db")
|
self.db_path = Path("temp_test.db")
|
||||||
if self.db_path.exists():
|
if self.db_path.exists():
|
||||||
self.db_path.unlink()
|
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):
|
async def test_insert_and_get(self):
|
||||||
await self.connector.insert("people", {"name": "John Doe", "age": 30})
|
await self.connector.insert("people", {"name": "John Doe", "age": 30})
|
||||||
|
Loading…
Reference in New Issue
Block a user