mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Avoid another MemoryError
This commit is contained in:
13
tests/telethon/tl/test_serialization.py
Normal file
13
tests/telethon/tl/test_serialization.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import pytest
|
||||
|
||||
from telethon.tl import types, functions
|
||||
|
||||
|
||||
def test_nested_invalid_serialization():
|
||||
large_long = 2**62
|
||||
request = functions.account.SetPrivacyRequest(
|
||||
key=types.InputPrivacyKeyChatInvite(),
|
||||
rules=[types.InputPrivacyValueDisallowUsers(users=[large_long])]
|
||||
)
|
||||
with pytest.raises(TypeError):
|
||||
bytes(request)
|
Reference in New Issue
Block a user