mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-12 12:00:37 +00:00
Avoid another MemoryError
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import io
|
||||
import pathlib
|
||||
|
||||
import pytest
|
||||
|
||||
from telethon import utils
|
||||
from telethon.tl.types import (
|
||||
MessageMediaGame, Game, PhotoEmpty
|
||||
|
||||
0
tests/telethon/tl/__init__.py
Normal file
0
tests/telethon/tl/__init__.py
Normal file
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