Onionr/onionr/tests/test_blocks.py
2019-07-25 11:14:13 -05:00

18 lines
549 B
Python
Executable File

#!/usr/bin/env python3
import sys, os
sys.path.append(".")
import unittest, uuid, hashlib
import nacl.exceptions
import nacl.signing, nacl.hash, nacl.encoding
TEST_DIR = 'testdata/%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/'
print("Test directory:", TEST_DIR)
os.environ["ONIONR_HOME"] = TEST_DIR
import onionrblocks
from utils import createdirs
createdirs.create_dirs()
class OnionrBlockTests(unittest.TestCase):
def test_plaintext_insert(self):
message = 'hello world'
onionrblocks.insert(message)
unittest.main()