From f595648a9bbe2a47976d5e37d2cb1765e37f6ec3 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 4 May 2024 20:27:27 +0200 Subject: [PATCH] Updated tests --- tests/link.py | 15 +++++++++++++++ tests/rnsconfig/config | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/link.py b/tests/link.py index 37ad91c..5cc8ca3 100644 --- a/tests/link.py +++ b/tests/link.py @@ -99,6 +99,9 @@ class TestLink(unittest.TestCase): id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0])) self.assertEqual(id1.hash, bytes.fromhex(fixed_keys[0][1])) + RNS.Transport.request_path(bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) + time.sleep(0.2) + dest = RNS.Destination(id1, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "link", "establish") self.assertEqual(dest.hash, bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) @@ -120,6 +123,9 @@ class TestLink(unittest.TestCase): id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0])) self.assertEqual(id1.hash, bytes.fromhex(fixed_keys[0][1])) + RNS.Transport.request_path(bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) + time.sleep(0.2) + dest = RNS.Destination(id1, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "link", "establish") self.assertEqual(dest.hash, bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) @@ -400,6 +406,9 @@ class TestLink(unittest.TestCase): id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0])) self.assertEqual(id1.hash, bytes.fromhex(fixed_keys[0][1])) + RNS.Transport.request_path(bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) + time.sleep(0.2) + dest = RNS.Destination(id1, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "link", "establish") self.assertEqual(dest.hash, bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) @@ -449,6 +458,9 @@ class TestLink(unittest.TestCase): id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0])) self.assertEqual(id1.hash, bytes.fromhex(fixed_keys[0][1])) + RNS.Transport.request_path(bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) + time.sleep(0.2) + dest = RNS.Destination(id1, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "link", "establish") self.assertEqual(dest.hash, bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) @@ -502,6 +514,9 @@ class TestLink(unittest.TestCase): id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0])) self.assertEqual(id1.hash, bytes.fromhex(fixed_keys[0][1])) + RNS.Transport.request_path(bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) + time.sleep(0.2) + dest = RNS.Destination(id1, RNS.Destination.OUT, RNS.Destination.SINGLE, APP_NAME, "link", "establish") self.assertEqual(dest.hash, bytes.fromhex("fb48da0e82e6e01ba0c014513f74540d")) diff --git a/tests/rnsconfig/config b/tests/rnsconfig/config index 0356f42..20001f9 100644 --- a/tests/rnsconfig/config +++ b/tests/rnsconfig/config @@ -9,4 +9,4 @@ loglevel = 1 [interfaces] - # No interfaces, only local traffic \ No newline at end of file + # No interfaces, only local traffic