From 7c37e3c58f56ec87ebfd98e30c3d10afb0e53677 Mon Sep 17 00:00:00 2001 From: jMyles Date: Tue, 13 Feb 2018 12:23:45 -0800 Subject: [PATCH] Bob now receives a Capsule via the side channel and handles it instead of a pfrag. --- tests/characters/test_bob_handles_frags.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/characters/test_bob_handles_frags.py b/tests/characters/test_bob_handles_frags.py index 3ade750dd..a0b2c3505 100644 --- a/tests/characters/test_bob_handles_frags.py +++ b/tests/characters/test_bob_handles_frags.py @@ -22,7 +22,7 @@ def test_bob_can_follow_treasure_map(enacted_policy, ursulas, alice, bob): assert len(bob._ursulas) == len(treasure_map) -def test_bob_can_issue_a_work_order_to_a_specific_ursula(enacted_policy, alice, bob, ursulas): +def test_bob_can_issue_a_work_order_to_a_specific_ursula(enacted_policy, alice, bob, ursulas, alicebob_side_channel): """ Now that Bob has his list of Ursulas, he can issue a WorkOrder to one. Upon receiving the WorkOrder, Ursula saves it and responds by re-encrypting and giving Bob a cFrag. @@ -37,14 +37,15 @@ def test_bob_can_issue_a_work_order_to_a_specific_ursula(enacted_policy, alice, bob.follow_treasure_map(hrac) assert len(bob._ursulas) == len(ursulas) - the_pfrag = enacted_policy.pfrag the_hrac = enacted_policy.hrac() # Bob has no saved work orders yet, ever. assert len(bob._saved_work_orders) == 0 + _ciphertext, capsule = alicebob_side_channel + # We'll test against just a single Ursula - here, we make a WorkOrder for just one. - work_orders = bob.generate_work_orders(the_hrac, the_pfrag, num_ursulas=1) + work_orders = bob.generate_work_orders(the_hrac, capsule, num_ursulas=1) assert len(work_orders) == 1 # Bob has saved the WorkOrder, but since he hasn't used it for reencryption yet, it's empty.