summaryrefslogtreecommitdiffstats
path: root/tests/crypto_test.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-01-13 23:24:21 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-01-13 23:24:21 -0500
commitd9371905744342356f4e4a0696500ca2a8f626b1 (patch)
tree79056bfc544580f8936288e6071eb0d547eb341e /tests/crypto_test.py
parenta84d58e45c78310dac3125ea65903e6af3d625a6 (diff)
tests/crypto_test.py: uses get_nodedirs function to fetch list of node directories.
Diffstat (limited to 'tests/crypto_test.py')
-rw-r--r--tests/crypto_test.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/crypto_test.py b/tests/crypto_test.py
index 042b88b..543f4b0 100644
--- a/tests/crypto_test.py
+++ b/tests/crypto_test.py
@@ -22,8 +22,10 @@ from glob import glob
from nose.tools import *
from os import path, remove
-from combox.file import *
+from combox.config import get_nodedirs
from combox.crypto import *
+from combox.file import *
+
CONFIG_DIR = path.join('tests', 'test-config')
@@ -71,8 +73,8 @@ def test_split_encryption():
ciphered_shards = encrypt_shards(f_shards, config['topsecret'])
# write ciphered shards to disk
- f_basename = "%s.ciphered" % path.basename(f)
- nodes = [path.abspath(node['path']) for node in config['nodes_info'].itervalues()]
+ f_basename = path.basename(f)
+ nodes = get_nodedirs(config)
write_shards(ciphered_shards, nodes, f_basename)
# read ciphered shards from disk