mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
added test for PyMongoStorage that checks if storage could be properly closed
This commit is contained in:
parent
d5bc476813
commit
6328bb3af5
1 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,14 @@ async def test_get_storage_passing_only_url(mongo_server):
|
|||
pytest.fail(str(e))
|
||||
|
||||
|
||||
async def test_pymongo_storage_close_does_not_throw(mongo_server):
|
||||
storage = PyMongoStorage.from_url(url=mongo_server)
|
||||
try:
|
||||
assert await storage.close() is None
|
||||
except Exception as e:
|
||||
pytest.fail(f"close() raised an exception: {e}")
|
||||
|
||||
|
||||
async def test_update_not_existing_data_with_empty_dictionary(
|
||||
mongo_storage: PyMongoStorage,
|
||||
storage_key: StorageKey,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue