Skip to content

Commit 8620fdf

Browse files
authored
test: fix websocket test
1 parent 63b1a8f commit 8620fdf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_provider.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import websocket # type: ignore
33
from ape.utils import ZERO_ADDRESS
44

5-
from ape_infura.provider import Infura
5+
from ape_infura.provider import Infura, _WEBSOCKET_CAPABLE_ECOSYSTEMS
66

77

88
def test_infura_http(provider):
@@ -17,6 +17,11 @@ def test_infura_http(provider):
1717

1818

1919
def test_infura_ws(provider):
20+
ecosystem = provider.network.ecosystem.name
21+
if ecosystem not in _WEBSOCKET_CAPABLE_ECOSYSTEMS:
22+
assert provider.ws_uri == None
23+
return
24+
2025
assert provider.ws_uri.startswith("wss")
2126

2227
try:

0 commit comments

Comments
 (0)