Update conftest.py

This commit is contained in:
Justin 2019-06-10 13:43:00 +01:00 committed by GitHub
parent 9bb0f25f18
commit 4d6a25f161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,26 +62,6 @@ def registration_contract(w3, tester):
return registration_deployed
@pytest.fixture(params=[0, 1, 2])
def modified_registration_contract(
request,
w3,
tester):
registration_code = get_deposit_contract_code()
contract_bytecode = compiler.compile_code(registration_code)['bytecode']
contract_abi = compiler.mk_full_signature(registration_code)
registration = w3.eth.contract(
abi=contract_abi,
bytecode=contract_bytecode)
tx_hash = registration.constructor().transact()
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
registration_deployed = w3.eth.contract(
address=tx_receipt.contractAddress,
abi=contract_abi
)
return registration_deployed
@pytest.fixture
def assert_tx_failed(tester):
def assert_tx_failed(function_to_test, exception=eth_tester.exceptions.TransactionFailed):