Fix imports for restructured test utilities

pull/423/head
tuxxy 2018-09-06 05:27:10 -06:00
parent c1c2d10be9
commit d0301a7818
7 changed files with 8 additions and 10 deletions

View File

@ -123,7 +123,7 @@ class TesterBlockchain(Blockchain):
accounts_to_make = self.__default_num_test_accounts - len(self.interface.w3.eth.accounts) accounts_to_make = self.__default_num_test_accounts - len(self.interface.w3.eth.accounts)
test_accounts = test_accounts if test_accounts is not None else self.__default_num_test_accounts test_accounts = test_accounts if test_accounts is not None else self.__default_num_test_accounts
from nucypher.utilities.blockchain import generate_accounts from nucypher.utilities.sandbox import generate_accounts
generate_accounts(w3=self.interface.w3, quantity=accounts_to_make) generate_accounts(w3=self.interface.w3, quantity=accounts_to_make)
assert test_accounts == len(self.interface.w3.eth.accounts) assert test_accounts == len(self.interface.w3.eth.accounts)

View File

@ -12,7 +12,6 @@ from nucypher.characters import Ursula
from nucypher.crypto.api import secure_random from nucypher.crypto.api import secure_random
from nucypher.network.middleware import RestMiddleware from nucypher.network.middleware import RestMiddleware
from nucypher.policy.models import Arrangement, Policy from nucypher.policy.models import Arrangement, Policy
from nucypher.utilities.blockchain import _TEST_KNOWN_URSULAS_CACHE
from umbral.keys import UmbralPrivateKey from umbral.keys import UmbralPrivateKey
from web3 import Web3 from web3 import Web3

View File

@ -4,7 +4,7 @@ import maya
from umbral.fragments import KFrag from umbral.fragments import KFrag
from nucypher.crypto.api import keccak_digest from nucypher.crypto.api import keccak_digest
from nucypher.utilities.network import _TEST_KNOWN_URSULAS_CACHE from nucypher.utilities.sandbox import _TEST_KNOWN_URSULAS_CACHE
class MockPolicyCreation: class MockPolicyCreation:

View File

@ -3,8 +3,7 @@ from eth_keys.datatypes import Signature as EthSignature
from nucypher.characters import Ursula from nucypher.characters import Ursula
from nucypher.crypto.powers import SigningPower, CryptoPower from nucypher.crypto.powers import SigningPower, CryptoPower
from nucypher.utilities.blockchain import make_ursulas from nucypher.utilities.sandbox import make_ursulas, MockRestMiddleware
from nucypher.utilities.network import MockRestMiddleware
@pytest.mark.skip("To be implemented...?") @pytest.mark.skip("To be implemented...?")

View File

@ -19,8 +19,8 @@ from nucypher.data_sources import DataSource
from nucypher.keystore import keystore from nucypher.keystore import keystore
from nucypher.keystore.db import Base from nucypher.keystore.db import Base
from nucypher.keystore.keypairs import SigningKeypair from nucypher.keystore.keypairs import SigningKeypair
from nucypher.utilities.blockchain import make_ursulas, token_airdrop from nucypher.utilities.blockchain import token_airdrop
from nucypher.utilities.network import MockRestMiddleware from nucypher.utilities.sandbox import make_ursulas, MockRestMiddleware
# #

View File

@ -7,7 +7,7 @@ from kademlia.utils import digest
from nucypher.characters import Ursula from nucypher.characters import Ursula
from nucypher.crypto.api import keccak_digest from nucypher.crypto.api import keccak_digest
from nucypher.crypto.powers import CryptoPower, SigningPower from nucypher.crypto.powers import CryptoPower, SigningPower
from nucypher.utilities.network import MockRestMiddleware from nucypher.utilities.sandbox import MockRestMiddleware
@pytest.mark.usefixtures('testerchain') @pytest.mark.usefixtures('testerchain')
@ -180,4 +180,4 @@ def test_alice_refuses_to_make_arrangement_unless_ursula_is_valid(blockchain_ali
idle_blockchain_policy.consider_arrangement(network_middleware=blockchain_alice.network_middleware, idle_blockchain_policy.consider_arrangement(network_middleware=blockchain_alice.network_middleware,
arrangement=FakeArrangement(), arrangement=FakeArrangement(),
ursula=vladimir ursula=vladimir
) )

View File

@ -6,7 +6,7 @@ from cryptography.hazmat.primitives import serialization
from twisted.internet import threads from twisted.internet import threads
from nucypher.characters import Ursula from nucypher.characters import Ursula
from nucypher.utilities.blockchain import make_ursulas from nucypher.utilities.sandbox import make_ursulas
def test_alice_enacts_policies_in_policy_group_via_rest(enacted_federated_policy): def test_alice_enacts_policies_in_policy_group_via_rest(enacted_federated_policy):