mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Implemnet chat hash cache and adapting updates
This commit is contained in:
10
client/tests/packed_chat_test.py
Normal file
10
client/tests/packed_chat_test.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from telethon._impl.session.chat.packed import PackedChat, PackedType
|
||||
|
||||
|
||||
def test_hash_optional() -> None:
|
||||
for ty in PackedType:
|
||||
pc = PackedChat(ty, 123, 456789)
|
||||
assert PackedChat.from_bytes(bytes(pc)) == pc
|
||||
|
||||
pc = PackedChat(ty, 987, None)
|
||||
assert PackedChat.from_bytes(bytes(pc)) == pc
|
Reference in New Issue
Block a user