Skip to content

Commit

Permalink
fix rpc endpoint test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSpuddy committed Oct 2, 2023
1 parent a014fb8 commit 8d4a701
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_rpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest
from brownie import chain
from requests.exceptions import HTTPError
from requests.exceptions import ConnectionError

from telliot_core.model.endpoints import EndpointList
from telliot_core.model.endpoints import RPCEndpoint
Expand Down Expand Up @@ -33,12 +34,14 @@ def test_very_bad_rpc_url():

def test_incomplete_rpc_url():
"""an incomplete url will raise an exception in RPCEndpoint"""
url = "https://eth-rpc.gateway.pokt.network/"
url = "https://eth-rpc.gateway.pokt.networ/"
endpt = RPCEndpoint(network=network, provider=provider, url=url)
try:
_ = endpt.connect()
except HTTPError:
pass # expected
except ConnectionError:
pass # expected
except ValueError as e:
assert "Invalid request path" in str(e)
else:
Expand Down

0 comments on commit 8d4a701

Please sign in to comment.