mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-14 21:46:38 +03:00
11 lines
294 B
Python
11 lines
294 B
Python
from telethon._impl.session import PackedType, PeerRef
|
|
|
|
|
|
def test_hash_optional() -> None:
|
|
for ty in PackedType:
|
|
pc = PeerRef(ty, 123, 456789)
|
|
assert PeerRef.from_bytes(bytes(pc)) == pc
|
|
|
|
pc = PeerRef(ty, 987, None)
|
|
assert PeerRef.from_bytes(bytes(pc)) == pc
|