Skip to content

Commit cf1ca5d

Browse files
committed
skip batch tests without token.
the token is required to make batch reqs
1 parent 91d51d4 commit cf1ca5d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/handler_async_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ async def test_get_details(n):
8888
@pytest.mark.asyncio
8989
async def test_get_batch_details(n):
9090
token = os.environ.get("IPINFO_TOKEN", "")
91+
if not token:
92+
pytest.skip("token required for batch tests")
9193
handler = AsyncHandler(token)
9294
ips = ["1.1.1.1", "8.8.8.8", "9.9.9.9"]
9395
details = await handler.getBatchDetails(ips)

tests/handler_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def test_get_details(n):
8282
@pytest.mark.parametrize("n", range(5))
8383
def test_get_batch_details(n):
8484
token = os.environ.get("IPINFO_TOKEN", "")
85+
if not token:
86+
pytest.skip("token required for batch tests")
8587
handler = Handler(token)
8688
ips = ["1.1.1.1", "8.8.8.8", "9.9.9.9"]
8789
details = handler.getBatchDetails(ips)

0 commit comments

Comments
 (0)