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
|
|
|
|
import core, onionr
|
|
|
|
|
|
|
|
c = core.Core()
|
|
|
|
|
|
|
|
class OnionrBlockTests(unittest.TestCase):
|
|
|
|
def test_plaintext_insert(self):
|
|
|
|
message = 'hello world'
|
2019-02-17 06:21:47 +00:00
|
|
|
c.insertBlock(message)
|
2019-02-16 04:08:26 +00:00
|
|
|
|
|
|
|
unittest.main()
|