mirror of https://github.com/nucypher/nucypher.git
Fixes incorrect splitter in map versioning and grant test assertion.
parent
7642300fe0
commit
81ca745bfa
|
@ -351,13 +351,13 @@ class SignedTreasureMap(TreasureMap):
|
|||
|
||||
cls._splitters['unversioned'] = BytestringKwargifier(cls,
|
||||
blockchain_signature=EIP712_MESSAGE_SIGNATURE_SIZE,
|
||||
public_signature=Signature,
|
||||
public_signature=signature_splitter,
|
||||
hrac=(bytes, HRAC_LENGTH),
|
||||
message_kit=(UmbralMessageKit, VariableLengthBytestring),
|
||||
)
|
||||
cls._splitters[1] = TreasureMapSplitter(cls,
|
||||
blockchain_signature=EIP712_MESSAGE_SIGNATURE_SIZE,
|
||||
public_signature=Signature,
|
||||
public_signature=signature_splitter,
|
||||
hrac=(bytes, HRAC_LENGTH),
|
||||
message_kit=(UmbralMessageKit, VariableLengthBytestring),
|
||||
)
|
||||
|
|
|
@ -15,12 +15,14 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
|
||||
import datetime
|
||||
|
||||
import maya
|
||||
import pytest
|
||||
|
||||
from nucypher.crypto.kits import PolicyMessageKit
|
||||
from nucypher.crypto.utils import keccak_digest
|
||||
from nucypher.datastore.models import PolicyArrangement
|
||||
from nucypher.datastore.models import TreasureMap as DatastoreTreasureMap
|
||||
from nucypher.policy.maps import SignedTreasureMap
|
||||
|
||||
|
@ -50,7 +52,10 @@ def test_decentralized_grant(blockchain_alice, blockchain_bob, blockchain_ursula
|
|||
for ursula in blockchain_ursulas:
|
||||
if ursula.checksum_address in policy.treasure_map.destinations:
|
||||
kfrag_kit = policy.treasure_map.destinations[ursula.checksum_address]
|
||||
assert bool(kfrag_kit) # TODO: try to decrypt?
|
||||
|
||||
# TODO: try to decrypt?
|
||||
# TODO: Use a new type for EncryptedKFrags?
|
||||
assert isinstance(kfrag_kit, PolicyMessageKit)
|
||||
|
||||
|
||||
def test_alice_sets_treasure_map_decentralized(enacted_blockchain_policy, blockchain_alice, blockchain_bob, blockchain_ursulas):
|
||||
|
|
|
@ -54,7 +54,6 @@ def test_federated_grant(federated_alice, federated_bob, federated_ursulas):
|
|||
assert ursula.checksum_address in policy.treasure_map.destinations
|
||||
|
||||
|
||||
|
||||
def test_federated_alice_can_decrypt(federated_alice, federated_bob):
|
||||
"""
|
||||
Test that alice can decrypt data encrypted by an enrico
|
||||
|
|
Loading…
Reference in New Issue