mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge 07059e32f9 into 25c76b7d74
This commit is contained in:
commit
752ad9f0c3
4 changed files with 23 additions and 0 deletions
|
|
@ -43,3 +43,9 @@ class TestStorages:
|
|||
"foo": "bar",
|
||||
"baz": "spam",
|
||||
}
|
||||
|
||||
async def test_get_value(self, bot: MockedBot, storage: BaseStorage, storage_key: StorageKey):
|
||||
await storage.set_data(key=storage_key, data={"hello": "world"})
|
||||
assert await storage.get_value(key=storage_key, data_key="hello") == "world"
|
||||
assert await storage.get_value(key=storage_key, data_key="12345") is None
|
||||
assert await storage.get_value(key=storage_key, data_key="qwerty", default=42) == 42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue