mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-16 06:26:37 +03:00
4b2d252fe1
Sure wish I would've automated this.
11 lines
309 B
Python
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
|