Skip to content

Commit

Permalink
Minor adjustments from updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita committed Jan 17, 2019
1 parent 921c70e commit 1be055d
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 24 deletions.
5 changes: 1 addition & 4 deletions tests/core/pm-module/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
from pytest_ethereum.deployer import (
Deployer,
)
from pytest_ethereum.plugins import (
twig_manifest,
)

from web3 import Web3
from web3.pm import (
Expand Down Expand Up @@ -173,7 +170,7 @@ def sol_registry(w3):

def vy_registry(w3):
registry_path = ASSETS_DIR / "vyper_registry"
manifest = twig_manifest(registry_path, "registry", "1.0.0")
manifest = json.loads((registry_path / "1.0.0.json").read_text().rstrip('\n'))
registry_package = Package(manifest, w3)
registry_deployer = Deployer(registry_package)
deployed_registry_package = registry_deployer.deploy("registry")
Expand Down
7 changes: 2 additions & 5 deletions tests/core/pm-module/test_ens_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ def bytes32(val):
return result.rjust(32, b'\0')


pytest_plugins = ["pytest_ethereum.plugins"]


@pytest.fixture
def ens_setup(solc_deployer):
def ens_setup(deployer):
# todo: move to module level once ethpm alpha stable
ENS_MANIFEST = ASSETS_DIR / 'ens' / '1.0.1.json'
ens_deployer = solc_deployer(ENS_MANIFEST)
ens_deployer = deployer(ENS_MANIFEST)
w3 = ens_deployer.package.w3

# ** Set up ENS contracts **
Expand Down
4 changes: 2 additions & 2 deletions tests/core/providers/test_websocket_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
Thread,
)

import websockets

from tests.utils import (
wait_for_ws,
)
import websockets

from web3 import Web3
from web3.exceptions import (
ValidationError,
Expand Down
2 changes: 1 addition & 1 deletion tests/generate_go_ethereum_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
to_text,
to_wei,
)

from tests.utils import (
get_open_port,
)

from web3 import Web3
from web3._utils.module_testing.emitter_contract import (
EMITTER_ABI,
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/generate_fixtures/go_ethereum.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
is_dict,
is_same_address,
)

import common
from tests.utils import (
get_open_port,
)

import common
from web3 import Web3
from web3._utils.module_testing.emitter_contract import (
EMITTER_ABI,
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/generate_fixtures/parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
from eth_utils import (
to_text,
)
from tests.utils import (
get_open_port,
)

import common
import go_ethereum
from tests.utils import (
get_open_port,
)
from web3 import Web3
from web3._utils.toolz import (
merge,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/go_ethereum/test_goethereum_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from tests.utils import (
get_open_port,
)

from web3 import Web3

from .common import (
Expand Down
1 change: 0 additions & 1 deletion tests/integration/go_ethereum/test_goethereum_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from tests.utils import (
get_open_port,
)

from web3 import Web3

from .common import (
Expand Down
1 change: 0 additions & 1 deletion tests/integration/go_ethereum/test_goethereum_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
get_open_port,
wait_for_ws,
)

from web3 import Web3

from .common import (
Expand Down
1 change: 0 additions & 1 deletion tests/integration/parity/test_parity_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests.utils import (
get_open_port,
)

from web3 import Web3
from web3._utils.module_testing import (
NetModuleTest,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/parity/test_parity_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from tests.integration.parity.utils import (
wait_for_socket,
)

from web3 import Web3
from web3._utils.module_testing import (
NetModuleTest,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/parity/test_parity_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
get_open_port,
wait_for_ws,
)

from web3 import Web3
from web3._utils.module_testing import (
NetModuleTest,
Expand Down
2 changes: 1 addition & 1 deletion web3/pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def set_registry(self, address: Address) -> None:
self.registry = VyperReferenceRegistry(canonical_address, self.web3)
elif is_ens_name(address):
self._validate_set_ens()
addr_lookup = self.web3.ens.address(address, guess_tld=False)
addr_lookup = self.web3.ens.address(address)
if not addr_lookup:
raise NameNotFound(
"No address found after ENS lookup for name: {0}.".format(address)
Expand Down

0 comments on commit 1be055d

Please sign in to comment.