Ejemplo n.º 1
0
 def test_hash_memo_and_ret_hash_memo(self):
     memo_hash = binascii.hexlify(os.urandom(16))
     hash_memo = HashMemo(memo_hash)
     ret_hash_memo = RetHashMemo(memo_hash)
     self.__asset_memo('hash', memo_hash, hash_memo)
     self.__asset_memo('ret_hash', memo_hash, ret_hash_memo)
Ejemplo n.º 2
0
 def test_hash_memo_and_ret_hash_memo_toolong(self):
     memo_hash = binascii.hexlify(os.urandom(32))
     with pytest.raises(XdrLengthError):
         HashMemo(memo_hash)
     with pytest.raises(XdrLengthError):
         RetHashMemo(memo_hash)
Ejemplo n.º 3
0
 def test_hash_memo_and_ret_hash_memo_toolong(self):
     memo_hash = binascii.hexlify(os.urandom(32)).decode() + ' '
     with pytest.raises(NotValidParamError):
         HashMemo(memo_hash)
     with pytest.raises(NotValidParamError):
         RetHashMemo(memo_hash)