#NEWLINE# def test_receive_small_packets( self , monkeypatch ) : #NEWLINE# #INDENT# monkeypatch . setattr ( hyper . common . bufsocket . select , 'select' , dummy_select ) #NEWLINE# s = DummySocket ( ) #NEWLINE# b = BufferedSocket ( s ) #NEWLINE# s . inbound_packets = [ b'Here' , b'begins' , b'the' , b'test' , b'data' ] #NEWLINE# d = b'' #NEWLINE# for _ in range ( 5 ) : #NEWLINE# #INDENT# d += b . recv ( 100 ) . tobytes ( ) #NEWLINE# #UNINDENT# assert ( d == b'Herebeginsthetestdata' )