Skip to content

Commit

Permalink
Ugly quick fix for linked libraries to be removed if merged
Browse files Browse the repository at this point in the history
  • Loading branch information
loredanacirstea committed Sep 18, 2018
1 parent a918c8a commit 717c660
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 16 deletions.
20 changes: 16 additions & 4 deletions raiden_contracts/tests/fixtures/test_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def token_network_test_storage(
return deploy_tester_contract(
'TokenNetworkInternalStorageTest',
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
[
custom_token.address,
secret_registry_contract.address,
Expand All @@ -39,7 +42,10 @@ def token_network_test_signatures(
return deploy_tester_contract(
'TokenNetworkSignatureTest',
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
[
custom_token.address,
secret_registry_contract.address,
Expand All @@ -61,7 +67,10 @@ def token_network_test_utils(
return deploy_tester_contract(
'TokenNetworkUtilsTest',
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
[
custom_token.address,
secret_registry_contract.address,
Expand All @@ -77,6 +86,9 @@ def signature_test_contract(deploy_tester_contract, token_network_utils_library)
return deploy_tester_contract(
'SignatureVerifyTest',
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
[],
)[0]
7 changes: 5 additions & 2 deletions raiden_contracts/tests/fixtures/token_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@


@pytest.fixture
def get_token_network(web3, deploy_tester_contract):
def get_token_network(web3, deploy_tester_contract, token_network_utils_library):
"""Deploy a token network as a separate contract (registry is not used)"""
def get(arguments):
return deploy_tester_contract(
CONTRACT_TOKEN_NETWORK,
{},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
arguments,
)[0]
return get
Expand Down
24 changes: 15 additions & 9 deletions raiden_contracts/tests/fixtures/token_network_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@
from eth_utils import is_address


@pytest.fixture
def token_network_utils_library(deploy_tester_contract, web3):
"""Deployed TokenNetworkUtils library"""
return deploy_tester_contract(LIBRARY_TOKEN_NETWORK_UTILS)[0]


@pytest.fixture()
def get_token_network_registry(deploy_tester_contract, token_network_utils_library):
def get(arguments, transaction=None):
return deploy_tester_contract(
CONTRACT_TOKEN_NETWORK_REGISTRY,
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
arguments,
)[0]
)
return get


@pytest.fixture
def token_network_utils_library(deploy_tester_contract, web3):
"""Deployed TokenNetworkUtils library"""
return deploy_tester_contract(LIBRARY_TOKEN_NETWORK_UTILS)[0]


@pytest.fixture
def token_network_registry_contract(
deploy_tester_contract,
Expand All @@ -40,7 +43,10 @@ def token_network_registry_contract(
return deploy_tester_contract(
CONTRACT_TOKEN_NETWORK_REGISTRY,
# {'TokenNetworkUtils': token_network_utils_library.address},
{'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address},
{
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
},
[
secret_registry_contract.address,
int(web3.version.network),
Expand Down
5 changes: 4 additions & 1 deletion raiden_contracts/tests/test_print_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def test_token_network_registry(
(token_network_utils_library, txn_hash) = deploy_tester_contract(LIBRARY_TOKEN_NETWORK_UTILS)
print_gas(txn_hash, LIBRARY_TOKEN_NETWORK_UTILS + ' DEPLOYMENT')

libs = {'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address}
libs = {
'/Users/loredana/ETH/raiden-contracts': token_network_utils_library.address,
'/home/travis/build/raiden-network/ra': token_network_utils_library.address,
}
(token_network_registry, txn_hash) = deploy_tester_contract(
CONTRACT_TOKEN_NETWORK_REGISTRY,
libs,
Expand Down

0 comments on commit 717c660

Please sign in to comment.