diff --git a/contrib/pyln-proto/tests/test_onion.py b/contrib/pyln-proto/tests/test_onion.py index e4b02c89b..f48878cc9 100644 --- a/contrib/pyln-proto/tests/test_onion.py +++ b/contrib/pyln-proto/tests/test_onion.py @@ -64,7 +64,7 @@ def test_tu_fields(): dirname = os.path.dirname(__file__) -vector_base = os.path.join(dirname, '..', '..', '..', 'tests', 'vectors') +vector_base = os.path.join(dirname, '..', 'vectors') have_vectors = os.path.exists(os.path.join(vector_base, 'onion-test-v0.json')) @@ -181,7 +181,7 @@ def sphinx_path_from_test_vector(filename: str) -> Tuple[onion.SphinxPath, dict] """Loads a sphinx test vector from the repo root. """ path = os.path.dirname(__file__) - root = os.path.join(path, '..', '..', '..') + root = os.path.join(path, '..') filename = os.path.join(root, filename) v = json.load(open(filename, 'r')) session_key = onion.Secret(bytes.fromhex(v['generate']['session_key'])) diff --git a/tests/vectors/onion-test-multi-frame.json b/contrib/pyln-proto/tests/vectors/onion-test-multi-frame.json similarity index 100% rename from tests/vectors/onion-test-multi-frame.json rename to contrib/pyln-proto/tests/vectors/onion-test-multi-frame.json diff --git a/tests/vectors/onion-test-v0.json b/contrib/pyln-proto/tests/vectors/onion-test-v0.json similarity index 100% rename from tests/vectors/onion-test-v0.json rename to contrib/pyln-proto/tests/vectors/onion-test-v0.json diff --git a/tests/test_onion.py b/tests/test_onion.py index fb1142c9a..dcafbbacd 100644 --- a/tests/test_onion.py +++ b/tests/test_onion.py @@ -83,13 +83,3 @@ def test_rendezvous_onion(directory, oniontool): store_onion(out[-1][5:]) assert(out == ['payload=000000000000000000000000000000000400000004000000000000000000000000']) - - -def test_onion_vectors(oniontool): - tests = [ - 'onion-test-multi-frame.json', - 'onion-test-v0.json'] - - for t in tests: - p = os.path.join(os.path.dirname(__file__), 'vectors', t) - print(subprocess.check_output([oniontool, 'runtest', p]).decode('ASCII'))