Skip to content

Commit 5a28622

Browse files
committed
✅ tests: add polygon connection tests
1 parent 7489208 commit 5a28622

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/test_block_logs_by_block.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ def test_basic():
1111
except Exception:
1212
assert False
1313

14+
def test_basic_polygon():
15+
try:
16+
api = Transpose(api_key, chain_id=137)
17+
18+
logs = api.block.logs_by_block(block_number_above=0)
19+
20+
assert len(logs) >= 1
21+
22+
except Exception:
23+
assert False
24+
1425
def test_cursor():
1526
try:
1627
api = Transpose(api_key)

tests/test_polygon_connection.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from transpose import Transpose, api_key
2+
from transpose.src.util.errors import TransposeInvalidAPIKey
3+
4+
def test_polygon_connection_chain_name():
5+
try:
6+
api = Transpose(api_key, chain="polygon")
7+
assert isinstance(api, (Transpose,))
8+
except Exception:
9+
assert False
10+
11+
def test_polygon_connection_chain_id():
12+
try:
13+
api = Transpose(api_key, chain_id=137)
14+
assert isinstance(api, (Transpose,))
15+
except Exception:
16+
assert False

0 commit comments

Comments
 (0)