Namespace and modularize nucypher sandbox utilities

pull/438/head
Kieran Prasch 2018-09-13 12:26:25 -07:00
parent fa71f0c8c5
commit f3c614db17
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import os
from apistar import TestClient
from nucypher.characters.lawful import Ursula
from nucypher.crypto.api import load_tls_certificate
from nucypher.network.middleware import RestMiddleware
from nucypher.utilities.sandbox.constants import TEST_KNOWN_URSULAS_CACHE
@ -50,7 +49,6 @@ class MockRestMiddleware(RestMiddleware):
id_as_hex = work_order.arrangement_id.hex()
assert os.path.exists(work_order.ursula.certificate_filepath), 'TLS Certificate does not exist on the filesystem'
return mock_client.post('http://localhost/kFrag/{}/reencrypt'.format(id_as_hex), payload)
def get_treasure_map_from_node(self, node, map_id):

View File

@ -32,6 +32,7 @@ def make_federated_ursulas(ursula_config,
federated_ursulas.add(ursula)
# Store this Ursula in our global testing cache.
port = ursula.rest_information()[0].port
TEST_KNOWN_URSULAS_CACHE[port] = ursula
@ -67,6 +68,7 @@ def make_decentralized_ursulas(ursula_config,
rest_port=port + 100,
**ursula_overrides)
if stake is True:
min_stake, balance = int(constants.MIN_ALLOWED_LOCKED), ursula.token_balance