Skip to content

Commit

Permalink
skip batch tests without token.
Browse files Browse the repository at this point in the history
the token is required to make batch reqs
  • Loading branch information
UmanShahzad committed Nov 6, 2020
1 parent 91d51d4 commit cf1ca5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/handler_async_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ async def test_get_details(n):
@pytest.mark.asyncio
async def test_get_batch_details(n):
token = os.environ.get("IPINFO_TOKEN", "")
if not token:
pytest.skip("token required for batch tests")
handler = AsyncHandler(token)
ips = ["1.1.1.1", "8.8.8.8", "9.9.9.9"]
details = await handler.getBatchDetails(ips)
Expand Down
2 changes: 2 additions & 0 deletions tests/handler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def test_get_details(n):
@pytest.mark.parametrize("n", range(5))
def test_get_batch_details(n):
token = os.environ.get("IPINFO_TOKEN", "")
if not token:
pytest.skip("token required for batch tests")
handler = Handler(token)
ips = ["1.1.1.1", "8.8.8.8", "9.9.9.9"]
details = handler.getBatchDetails(ips)
Expand Down

0 comments on commit cf1ca5d

Please sign in to comment.