mirror of https://github.com/nucypher/nucypher.git
Additional deprecation of alice DHT usage.
parent
2c0a844da8
commit
94d94d3407
|
@ -76,8 +76,8 @@ def ursulas(deployed_testerchain):
|
|||
|
||||
@pytest.fixture(scope="module")
|
||||
def treasure_map_is_set_on_dht(enacted_policy, ursulas):
|
||||
networky_stuff = MockNetworkMiddleware(ursulas)
|
||||
enacted_policy.publish_treasure_map(networky_stuff, use_dht=True)
|
||||
network_middleware = MockNetworkMiddleware(ursulas)
|
||||
enacted_policy.publish_treasure_map(network_middleware, use_dht=True)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
|
|
@ -4,7 +4,7 @@ from datetime import datetime
|
|||
from nucypher.keystore import keystore, keypairs
|
||||
|
||||
|
||||
@pytest.mark.usefixtures(('nucypher_test_config', 'deploy_nucypher_contracts'))
|
||||
@pytest.mark.usefixtures('deployed_testerchain')
|
||||
def test_key_sqlite_keystore(test_keystore, bob):
|
||||
|
||||
# Test add pubkey
|
||||
|
|
|
@ -46,23 +46,7 @@ def test_vladimir_illegal_interface_key_does_not_propagate(ursulas):
|
|||
loop.run_until_complete(setter)
|
||||
|
||||
# Now Ursula has seen an illegal key.
|
||||
assert digest(illegal_key) in ursula.server.protocol.illegal_keys_seen
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('deploy_nucypher_contracts')
|
||||
def test_alice_finds_ursula_via_dht(alice, mock_miner_agent):
|
||||
"""
|
||||
With the help of any Ursula, Alice can find a specific Ursula.
|
||||
"""
|
||||
ursula_index = 1
|
||||
all_ursulas = list(mock_miner_agent.swarm(fetch_data=True))
|
||||
ether_address, ursula_id = alice.server.get_now(all_ursulas[ursula_index])
|
||||
header, _signature, _ursula_pubkey_sig, interface_info = dht_value_splitter(ursula_id,
|
||||
return_remainder=True)
|
||||
|
||||
assert header == constants.BYTESTRING_IS_URSULA_IFACE_INFO
|
||||
port = msgpack.loads(interface_info)[1]
|
||||
assert port == constants.URSULA_PORT_SEED + ursula_index
|
||||
assert digest(illegal_key) in ursula.dht_server.protocol.illegal_keys_seen
|
||||
|
||||
|
||||
def test_alice_finds_ursula_via_rest(alice, ursulas):
|
||||
|
|
Loading…
Reference in New Issue