#NEWLINE# def test_decrypt_invalid_data( self ) : #NEWLINE# #INDENT# regex = 'does not look like a TripleSec ciphertext' #NEWLINE# self . assertRaisesRegexp ( TripleSecError , self , ( lambda : triplesec . decrypt ( b'foo' , b'xxx' ) ) ) #NEWLINE# self . assertRaisesRegexp ( TripleSecError , regex , ( lambda : triplesec . decrypt ( unhex ( b'1c94d7de00000003abcdef' ) , b'xxx' ) ) ) #NEWLINE# self . assertRaisesRegexp ( TripleSecError , regex , ( lambda : triplesec . decrypt ( ( b'12345678901235' * 100 ) , b'xxx' ) ) )