Onionr/src/runtests/inserttest.py

19 lines
391 B
Python
Raw Normal View History

2019-10-07 05:51:30 +00:00
import os
import time
2019-10-07 05:51:30 +00:00
import onionrblocks
import logger
import coredb
from communicator import peeraction
2019-10-07 05:51:30 +00:00
2019-10-11 09:28:43 +00:00
def _check_remote_node(testmanager):
return
2019-10-11 09:28:43 +00:00
2019-10-07 05:51:30 +00:00
def insert_bin_test(testmanager):
data = os.urandom(32)
b_hash = onionrblocks.insert(data)
2019-10-11 09:28:43 +00:00
2019-10-07 05:51:30 +00:00
if not b_hash in coredb.blockmetadb.get_block_list():
logger.error(str(b_hash) + 'is not in bl')
2019-10-11 09:28:43 +00:00
raise ValueError