Create bob_control fixture

pull/743/head
tuxxy 2019-02-10 13:37:24 -07:00
parent 71d1d9f709
commit 7882ed6114
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,6 @@
from flask import Flask, request, Response
def make_bob_control(drone_bob: 'Bob'):
bob_control = Flask('bob-control')
return bob_control

View File

@ -38,6 +38,7 @@ 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.network.character_control.alice_control import make_alice_control from nucypher.network.character_control.alice_control import make_alice_control
from nucypher.network.character_control.bob_control import make_bob_control
from nucypher.utilities.sandbox.blockchain import TesterBlockchain, token_airdrop from nucypher.utilities.sandbox.blockchain import TesterBlockchain, token_airdrop
from nucypher.utilities.sandbox.constants import (NUMBER_OF_URSULAS_IN_DEVELOPMENT_NETWORK, from nucypher.utilities.sandbox.constants import (NUMBER_OF_URSULAS_IN_DEVELOPMENT_NETWORK,
DEVELOPMENT_TOKEN_AIRDROP_AMOUNT, MOCK_URSULA_STARTING_PORT, DEVELOPMENT_TOKEN_AIRDROP_AMOUNT, MOCK_URSULA_STARTING_PORT,
@ -333,6 +334,15 @@ def alice_control(federated_alice):
yield alice_control.test_client() yield alice_control.test_client()
@pytest.fixture(scope='module')
def bob_control(federated_bob):
federated_bob.start_learning_loop(now=True)
bob_control = make_bob_control(federated_bob)
bob_control.config['DEBUG'] = True
bob_control.config['TESTING'] = True
yield bob_control.test_client()
# #
# Blockchain # Blockchain
# #