work on runtime tests and onboarding

This commit is contained in:
Kevin Froman 2019-10-07 00:51:30 -05:00
parent dbb306d7ee
commit c22f084315
6 changed files with 259 additions and 6 deletions

View file

@ -45,9 +45,9 @@ def insert_block(data: Union[str, bytes], header: str ='txt',
with open(filepaths.data_nonce_file, 'a') as nonceFile:
nonceFile.write(dataNonce + '\n')
if type(data) is bytes:
data = data.decode()
data = str(data)
#if type(data) is bytes:
# data = data.decode()
#data = str(data)
plaintext = data
plaintextMeta = {}
plaintextPeer = asymPeer

View file

@ -20,9 +20,9 @@
import logger
from onionrutils import epoch
from . import uicheck
from . import uicheck, inserttest
RUN_TESTS = [uicheck.check_ui]
RUN_TESTS = [uicheck.check_ui, inserttest.insert_bin_test]
class OnionrRunTestManager:
def __init__(self):

View file

@ -0,0 +1,13 @@
import os
import onionrblocks
import logger
import coredb
def insert_bin_test(testmanager):
data = os.urandom(32)
b_hash = onionrblocks.insert(data, )
if not b_hash in coredb.blockmetadb.get_block_list():
logger.error(str(b_hash) + 'is not in bl')
raise ValueError