diff --git a/tests/handler_async_test.py b/tests/handler_async_test.py index 22fd585..9f43efd 100644 --- a/tests/handler_async_test.py +++ b/tests/handler_async_test.py @@ -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) diff --git a/tests/handler_test.py b/tests/handler_test.py index d771b77..9cd7936 100644 --- a/tests/handler_test.py +++ b/tests/handler_test.py @@ -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)