mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 09:57:29 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			357 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			357 B
		
	
	
	
		
			Python
		
	
	
	
	
	
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)
 |