#NEWLINE# def test_tee_to_bytearray( streamed_response ) : #NEWLINE# #INDENT# response = streamed_response #NEWLINE# arr = bytearray ( ) #NEWLINE# expected_arr = bytearray ( ( b'chunk' * 8 ) ) #NEWLINE# expected_len = len ( expected_arr ) #NEWLINE# assert ( expected_len == sum ( ( len ( c ) for c in tee . tee_to_bytearray ( response , arr ) ) ) ) #NEWLINE# assert ( expected_arr == arr )