#NEWLINE# def test_validation_success( ) : #NEWLINE# #INDENT# msg = _proto . create ( 'ACK' ) #NEWLINE# r = receiver . Receiver ( _proto ) #NEWLINE# partial = r . consume ( decode_utf8 ( msg . header_json ) ) . result ( ) #NEWLINE# assert ( partial is None ) #NEWLINE# partial = r . consume ( decode_utf8 ( msg . metadata_json ) ) . result ( ) #NEWLINE# assert ( partial is None ) #NEWLINE# partial = r . consume ( decode_utf8 ( msg . content_json ) ) . result ( ) #NEWLINE# assert ( partial is not None ) #NEWLINE# assert ( partial . msgtype == msg . msgtype ) #NEWLINE# assert ( partial . header == msg . header ) #NEWLINE# assert ( partial . content == msg . content ) #NEWLINE# assert ( partial . metadata == msg . metadata )