Ejemplo n.º 1
0
def test_deprecated_init_ethpm(ipfs_mock, network):
    network.connect("ropsten")

    with pytest.warns(DeprecationWarning):
        old = Contract("ComplexNothing", manifest_uri="ipfs://testipfs-complex")

    assert old == Contract.from_ethpm("ComplexNothing", manifest_uri="ipfs://testipfs-complex")
Ejemplo n.º 2
0
def test_contract_from_ethpm_no_deployments(ipfs_mock, network):
    network.connect("kovan")
    with pytest.raises(ContractNotFound):
        Contract.from_ethpm("ComplexNothing", manifest_uri="ipfs://testipfs-complex")
Ejemplo n.º 3
0
def test_contract_from_ethpm_multiple_deployments(ipfs_mock, network):
    network.connect("mainnet")
    with pytest.raises(ValueError):
        Contract.from_ethpm("ComplexNothing", manifest_uri="ipfs://testipfs-complex")
Ejemplo n.º 4
0
def test_contract_from_ethpm(ipfs_mock, network):
    network.connect("ropsten")
    Contract.from_ethpm("ComplexNothing", manifest_uri="ipfs://testipfs-complex")