From a50abcd20af38521c7c2b97ea148e7197c85cb61 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 10 Sep 2019 17:35:44 -0500 Subject: [PATCH] work on blocks tests --- onionr/tests/test_blocks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/onionr/tests/test_blocks.py b/onionr/tests/test_blocks.py index 13332e08..8dfa103f 100755 --- a/onionr/tests/test_blocks.py +++ b/onionr/tests/test_blocks.py @@ -8,11 +8,17 @@ TEST_DIR = 'testdata/%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/' print("Test directory:", TEST_DIR) os.environ["ONIONR_HOME"] = TEST_DIR import onionrblocks +import onionrstorage from utils import createdirs +from onionrutils import bytesconverter createdirs.create_dirs() class OnionrBlockTests(unittest.TestCase): def test_plaintext_insert(self): message = 'hello world' - onionrblocks.insert(message) + bl = onionrblocks.insert(message) + self.assertIn(bytesconverter.str_to_bytes(message), onionrstorage.getData(bl)) + + #def test_encrypted_insert(self): + # key_pair_1 = nacl.signing.SigningKey.generate(encoder=nacl.encoding.base32) unittest.main() \ No newline at end of file