#NEWLINE# def testGRRSignedBlob( self ) : #NEWLINE# #INDENT# urn = 'aff4:/test/collection' #NEWLINE# fd = collects . GRRSignedBlob . NewFromContent ( 'hello world' , urn , chunk_size = 2 , token = self . token , private_key = config_lib . CONFIG [ 'PrivateKeys.executable_signing_private_key' ] , public_key = config_lib . CONFIG [ 'Client.executable_signing_public_key' ] ) #NEWLINE# fd = aff4 . FACTORY . Open ( urn , token = fd . token ) #NEWLINE# self . assertEqual ( fd . read ( 10000 ) , 'hello world' ) #NEWLINE# self . assertEqual ( fd . size , 11 ) #NEWLINE# self . assertEqual ( len ( fd . collection ) , 6 ) #NEWLINE# self . assertEqual ( fd . collection [ 0 ] . data , 'he' ) #NEWLINE# self . assertEqual ( fd . collection [ 1 ] . data , 'll' ) #NEWLINE# self . assertRaises ( IOError , fd . write , 'foo' )