mirror of https://github.com/nucypher/nucypher.git
Bob now receives a Capsule via the side channel and handles it instead of a pfrag.
parent
7de5a7ec26
commit
7c37e3c58f
|
@ -22,7 +22,7 @@ def test_bob_can_follow_treasure_map(enacted_policy, ursulas, alice, bob):
|
||||||
assert len(bob._ursulas) == len(treasure_map)
|
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
|
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.
|
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)
|
bob.follow_treasure_map(hrac)
|
||||||
assert len(bob._ursulas) == len(ursulas)
|
assert len(bob._ursulas) == len(ursulas)
|
||||||
|
|
||||||
the_pfrag = enacted_policy.pfrag
|
|
||||||
the_hrac = enacted_policy.hrac()
|
the_hrac = enacted_policy.hrac()
|
||||||
|
|
||||||
# Bob has no saved work orders yet, ever.
|
# Bob has no saved work orders yet, ever.
|
||||||
assert len(bob._saved_work_orders) == 0
|
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.
|
# 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
|
assert len(work_orders) == 1
|
||||||
|
|
||||||
# Bob has saved the WorkOrder, but since he hasn't used it for reencryption yet, it's empty.
|
# Bob has saved the WorkOrder, but since he hasn't used it for reencryption yet, it's empty.
|
||||||
|
|
Loading…
Reference in New Issue