nucypher/tests/conftest.py

29 lines
659 B
Python
Raw Normal View History

2017-11-16 01:51:16 +00:00
import pytest
from nkms_eth.blockchain import Blockchain
from nkms_eth.token import NuCypherKMSToken
from tests.utilities import TesterBlockchain, MockEscrow
2017-11-16 01:51:16 +00:00
@pytest.fixture(scope='function')
def testerchain():
chain = TesterBlockchain()
yield chain
del chain
TesterBlockchain._instance = None
@pytest.fixture(scope='function')
def token(testerchain):
token = NuCypherKMSToken(blockchain=testerchain)
token.arm()
token.deploy()
yield token
@pytest.fixture(scope='function')
def escrow(testerchain, token):
escrow = MockEscrow(blockchain=testerchain, token=token)
escrow.arm()
escrow.deploy()
yield escrow