2019-02-16 04:08:26 +00:00
|
|
|
#!/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
|
2019-07-25 16:14:13 +00:00
|
|
|
import onionrblocks
|
|
|
|
from utils import createdirs
|
|
|
|
createdirs.create_dirs()
|
2019-02-16 04:08:26 +00:00
|
|
|
class OnionrBlockTests(unittest.TestCase):
|
|
|
|
def test_plaintext_insert(self):
|
|
|
|
message = 'hello world'
|
2019-07-25 16:14:13 +00:00
|
|
|
onionrblocks.insert(message)
|
2019-02-16 04:08:26 +00:00
|
|
|
|
|
|
|
unittest.main()
|