Skip to content

Commit

Permalink
update ethpm version
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Mar 22, 2019
1 parent c78487a commit 9ae9610
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 0 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
)


# TODO: Take out when ethpm issue https://github.com/ethpm/py-ethpm/issues/148
# gets closed
os.environ['WEB3_INFURA_PROJECT_ID'] = 'test-key'


class PollDelayCounter:
def __init__(self, initial_delay=0, max_delay=1, initial_step=0.01):
self.initial_delay = initial_delay
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"eth-hash[pycryptodome]>=0.2.0,<1.0.0",
"eth-typing>=2.0.0,<3.0.0",
"eth-utils>=1.3.0,<2.0.0",
"ethpm>=0.1.4a12,<1.0.0",
"ethpm>=0.1.4a13,<1.0.0",
"hexbytes>=0.1.0,<1.0.0",
"lru-dict>=1.1.6,<2.0.0",
"requests>=2.16.0,<3.0.0",
Expand Down
14 changes: 10 additions & 4 deletions tests/core/providers/test_auto_provider.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import importlib
import os
import pytest

from web3.auto import (
infura,
)
from web3.exceptions import (
InfuraKeyNotFound,
)
Expand All @@ -16,6 +14,14 @@
load_provider_from_environment,
)

# Ugly hack to import infura now that API KEY is required
os.environ['WEB3_INFURA_API_KEY'] = 'test'
from web3.auto import ( # noqa E402 isort:skip
infura,
)
del os.environ['WEB3_INFURA_API_KEY']
# end ugly hack


@pytest.mark.parametrize(
'uri, expected_type, expected_attrs',
Expand Down Expand Up @@ -46,7 +52,7 @@ def test_web3_auto_infura_empty_key(monkeypatch, caplog):

def test_web3_auto_infura_deleted_key(monkeypatch, caplog):
monkeypatch.setenv('WEB3_INFURA_SCHEME', 'https')
importlib.reload(infura)

monkeypatch.delenv('WEB3_INFURA_API_KEY', raising=False)
monkeypatch.delenv('WEB3_INFURA_PROJECT_ID', raising=False)

Expand Down

0 comments on commit 9ae9610

Please sign in to comment.