Skip to content

Commit

Permalink
Merge pull request #384 from tellor-io/rmv-fuse-test-fixture
Browse files Browse the repository at this point in the history
Fix test failures
  • Loading branch information
akremstudy authored Jun 8, 2023
2 parents 5d3505d + 6d4e0d5 commit 7f54de8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,6 @@ Pipfile.lock
package.json
package-lock.json
node_modules/

# MacOS
.DS_Store
23 changes: 0 additions & 23 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,3 @@ def mumbai_test_cfg(scope="session", autouse=True):
@pytest.fixture
def rinkeby_test_cfg(scope="session", autouse=True):
return local_node_cfg(chain_id=4)


@pytest.fixture(scope="session", autouse=True)
def fuse_cfg():
"""Return a test telliot configuration for use on polygon-mumbai
If environment variables are defined, they will override the values in config files
"""
cfg = TelliotConfig()

# Override configuration for fuse testnet
cfg.main.chain_id = 122

accounts = find_accounts(chain_id=122)
if not accounts:
# Create a test account using PRIVATE_KEY defined on github.
key = os.getenv("PRIVATE_KEY", None)
if key:
ChainedAccount.add("git-fuse-key", chains=122, key=os.environ["PRIVATE_KEY"], password="")
else:
raise Exception("Need a Fuse account")

return cfg
3 changes: 1 addition & 2 deletions tests/test_rpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Tests covering Pytelliot rpc connection utils.
"""
import pytest
import requests
from brownie import chain

from telliot_core.model.endpoints import EndpointList
Expand Down Expand Up @@ -36,7 +35,7 @@ def test_incomplete_rpc_url():
url = "https://eth-rinkeby.gateway.pokt.network/v1/lb/"
endpt = RPCEndpoint(network=network, provider=provider, url=url)
# expect bad url error from requests library
with pytest.raises(requests.exceptions.HTTPError):
with pytest.raises(ValueError):
_ = endpt.connect()


Expand Down

0 comments on commit 7f54de8

Please sign in to comment.