#NEWLINE# def test_signDataRSA( self ) : #NEWLINE# #INDENT# '\n        Sign data with an RSA private key and then verify it with the public\n        key.\n        ' #NEWLINE# d = self . client . signData ( self . rsaPublic . blob ( ) , 'John Hancock' ) #NEWLINE# self . pump . flush ( ) #NEWLINE# def _check( sig ) : #NEWLINE# #INDENT# expected = self . rsaPrivate . sign ( 'John Hancock' ) #NEWLINE# self . assertEqual ( expected , sig ) #NEWLINE# self . assertTrue ( self . rsaPublic . verify ( sig , 'John Hancock' ) ) #NEWLINE# #UNINDENT# return d . addCallback ( self )