Skip to content

Commit

Permalink
test: fix websocket test
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu authored Nov 1, 2023
1 parent 63b1a8f commit 8620fdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import websocket # type: ignore
from ape.utils import ZERO_ADDRESS

from ape_infura.provider import Infura
from ape_infura.provider import Infura, _WEBSOCKET_CAPABLE_ECOSYSTEMS


def test_infura_http(provider):
Expand All @@ -17,6 +17,11 @@ def test_infura_http(provider):


def test_infura_ws(provider):
ecosystem = provider.network.ecosystem.name
if ecosystem not in _WEBSOCKET_CAPABLE_ECOSYSTEMS:
assert provider.ws_uri == None
return

assert provider.ws_uri.startswith("wss")

try:
Expand Down

0 comments on commit 8620fdf

Please sign in to comment.