Telethon/tests/telethon/tl/test_serialization.py
2021-09-12 12:16:02 +02:00

14 lines
347 B
Python

import pytest
from telethon.tl import types, functions
def test_nested_invalid_serialization():
large_long = 2**62
request = _tl.fn.account.SetPrivacy(
key=types.InputPrivacyKeyChatInvite(),
rules=[types.InputPrivacyValueDisallowUsers(users=[large_long])]
)
with pytest.raises(TypeError):
bytes(request)