@@ -512,12 +512,12 @@ def test_GIVEN_has_mpl_AND_encryption_materials_has_required_EC_keys_WHEN_prep_m
512
512
test_encryptor ._prep_message ()
513
513
514
514
# Then: Assert correctness of partitioned EC
515
- for k , _ in encryption_context .items ():
515
+ for k , v in encryption_context .items ():
516
516
# If a key is in required_encryption_context_keys, then
517
517
if k in required_encryption_context_keys :
518
518
# 1) Its EC is in the StreamEncryptor._required_encryption_context
519
519
assert k in test_encryptor ._required_encryption_context
520
- assert test_encryptor ._required_encryption_context [k ] == encryption_context [ k ]
520
+ assert test_encryptor ._required_encryption_context [k ] == v
521
521
# 2) Its EC is NOT in the StreamEncryptor._stored_encryption_context
522
522
assert k not in test_encryptor ._stored_encryption_context
523
523
# If a key is NOT in required_encryption_context_keys, then
@@ -526,7 +526,7 @@ def test_GIVEN_has_mpl_AND_encryption_materials_has_required_EC_keys_WHEN_prep_m
526
526
assert k not in test_encryptor ._required_encryption_context
527
527
# 2) Its EC is in the StreamEncryptor._stored_encryption_context
528
528
assert k in test_encryptor ._stored_encryption_context
529
- assert test_encryptor ._stored_encryption_context [k ] == encryption_context [ k ]
529
+ assert test_encryptor ._stored_encryption_context [k ] == v
530
530
531
531
# Assert size(stored_EC) + size(required_EC) == size(EC)
532
532
# (i.e. every EC was sorted into one or the other)
0 commit comments