From a46651f5c2a5f201f7f8920b599c6e4f2acd87b1 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sat, 23 Feb 2019 20:46:49 +0100 Subject: [PATCH] Alice and Bob get initial keys --- test/sync_handshake.py | 4 +++- test/sync_test.py | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/test/sync_handshake.py b/test/sync_handshake.py index c08562f..6aa7865 100644 --- a/test/sync_handshake.py +++ b/test/sync_handshake.py @@ -19,7 +19,9 @@ class UserInterface(pEp.UserInterface): print("signal " + str(signal) + " for identities " + str(me) + " " + str(partner)) -def run(): +def run(path): + me = pEp.Identity(path + "@peptest.ch", path + " Neuman") + pEp.myself(me) pEp.messageToSend = messageToSend ui = UserInterface() diff --git a/test/sync_test.py b/test/sync_test.py index a20dff0..2bff992 100644 --- a/test/sync_test.py +++ b/test/sync_test.py @@ -19,7 +19,7 @@ def test_for(path): print("running tests for " + path); from sync_handshake import run - run() + run(path) os.chdir(cwd) @@ -76,21 +76,21 @@ optParser.add_option("-c", "--clean", action="store_true", dest="clean") (options, args) = optParser.parse_args() if options.clean: - rmrf("alice") - rmrf("bob") + rmrf("Alice") + rmrf("Bob") else: - setup("alice") - setup("bob") + setup("Alice") + setup("Bob") - alice = os.fork() - if alice == 0: - test_for("alice") + Alice = os.fork() + if Alice == 0: + test_for("Alice") else: - bob = os.fork() - if bob == 0: - test_for("bob") + Bob = os.fork() + if Bob == 0: + test_for("Bob") else: - waitpid(alice) - waitpid(bob) + waitpid(Alice) + waitpid(Bob)