Telethon/client/tests/packed_chat_test.py
Lonami Exo 4b2d252fe1 Significantly clean-up imports
Sure wish I would've automated this.
2023-09-02 23:19:04 +02:00

11 lines
309 B
Python

from telethon._impl.session 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