Update.
This commit is contained in:
parent
695efe6d2f
commit
1a7cc682f6
11
ads.py
11
ads.py
@ -249,9 +249,6 @@ class AsyncDataSetConnector:
|
|||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TestAsyncDataSetConnector(unittest.IsolatedAsyncioTestCase):
|
class TestAsyncDataSetConnector(unittest.IsolatedAsyncioTestCase):
|
||||||
|
|
||||||
async def asyncSetUp(self):
|
async def asyncSetUp(self):
|
||||||
@ -321,15 +318,15 @@ class TestAsyncDataSetConnector(unittest.IsolatedAsyncioTestCase):
|
|||||||
async def test_inject(self):
|
async def test_inject(self):
|
||||||
await self.connector.insert("people", {"name": "John Doe", "index": 30})
|
await self.connector.insert("people", {"name": "John Doe", "index": 30})
|
||||||
await self.connector.insert("people", {"name": "Alice", "index": 23})
|
await self.connector.insert("people", {"name": "Alice", "index": 23})
|
||||||
await self.connector.delete("people", {"name": "John Doe","index": 30})
|
await self.connector.delete("people", {"name": "John Doe", "index": 30})
|
||||||
self.assertIsNone(await self.connector.get("people", {"name": "John Doe"}))
|
self.assertIsNone(await self.connector.get("people", {"name": "John Doe"}))
|
||||||
count = await self.connector.count("people")
|
count = await self.connector.count("people")
|
||||||
self.assertEqual(count, 1)
|
self.assertEqual(count, 1)
|
||||||
|
|
||||||
|
|
||||||
async def test_insert_binary(self):
|
async def test_insert_binary(self):
|
||||||
await self.connector.insert("binaries",{"data":b"1234"})
|
await self.connector.insert("binaries", {"data": b"1234"})
|
||||||
print(await self.connector.get("binaries",{"data":b"1234"}))
|
print(await self.connector.get("binaries", {"data": b"1234"}))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user