Rename PackedChat type to PeerRef

This commit is contained in:
Lonami Exo
2024-03-17 13:21:26 +01:00
parent 7e413e4ee2
commit 46223bcbcc
20 changed files with 65 additions and 65 deletions

View File

@@ -1,10 +1,10 @@
from telethon._impl.session import PackedChat, PackedType
from telethon._impl.session import PackedType, PeerRef
def test_hash_optional() -> None:
for ty in PackedType:
pc = PackedChat(ty, 123, 456789)
assert PackedChat.from_bytes(bytes(pc)) == pc
pc = PeerRef(ty, 123, 456789)
assert PeerRef.from_bytes(bytes(pc)) == pc
pc = PackedChat(ty, 987, None)
assert PackedChat.from_bytes(bytes(pc)) == pc
pc = PeerRef(ty, 987, None)
assert PeerRef.from_bytes(bytes(pc)) == pc