#NEWLINE# def test_chunk_bytes( self ) : #NEWLINE# #INDENT# '\n        Makes sure chunk_bytes works correctly\n        ' #NEWLINE# result = list ( FakeAsgiHandler . chunk_bytes ( b'' ) ) #NEWLINE# self . assertEqual ( len ( result ) , 1 ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 0 ] , b'' ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 1 ] , True ) #NEWLINE# result = list ( FakeAsgiHandler . chunk_bytes ( b'12345678901234567890123456789' ) ) #NEWLINE# self . assertEqual ( len ( result ) , 1 ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 0 ] , b'12345678901234567890123456789' ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 1 ] , True ) #NEWLINE# result = list ( FakeAsgiHandler . chunk_bytes ( b'123456789012345678901234567890' ) ) #NEWLINE# self . assertEqual ( len ( result ) , 1 ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 0 ] , b'123456789012345678901234567890' ) #NEWLINE# self . assertEqual ( self [ 0 ] [ 1 ] , True ) #NEWLINE# result = list ( FakeAsgiHandler . chunk_bytes ( b'123456789012345678901234567890a' ) ) #NEWLINE# self . assertEqual ( len ( result ) , 2 ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 0 ] , b'123456789012345678901234567890' ) #NEWLINE# self . assertEqual ( result [ 0 ] [ 1 ] , False ) #NEWLINE# self . assertEqual ( result [ 1 ] [ 0 ] , b'a' ) #NEWLINE# self . assertEqual ( result [ 1 ] [ 1 ] , True )