Skip to content

Commit 86ad9bd

Browse files
committed
Use IPINFO_TOKEN env var in tests instead of IPINFO_LITE_TOKEN
1 parent 90d6a08 commit 86ad9bd

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

tests/handler_lite_async_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ async def test_headers():
5757

5858

5959
@pytest.mark.skipif(
60-
"IPINFO_LITE_TOKEN" not in os.environ,
60+
"IPINFO_TOKEN" not in os.environ,
6161
reason="Can't call Lite API without token",
6262
)
6363
@pytest.mark.asyncio
6464
async def test_get_details():
65-
token = os.environ.get("IPINFO_LITE_TOKEN", "")
65+
token = os.environ.get("IPINFO_TOKEN", "")
6666
handler = AsyncHandlerLite(token)
6767
details = await handler.getDetails("8.8.8.8")
6868
assert isinstance(details, Details)
@@ -89,7 +89,7 @@ async def test_get_details():
8989

9090

9191
@pytest.mark.skipif(
92-
"IPINFO_LITE_TOKEN" not in os.environ,
92+
"IPINFO_TOKEN" not in os.environ,
9393
reason="Can't call Lite API without token",
9494
)
9595
@pytest.mark.parametrize(
@@ -144,7 +144,7 @@ async def mock_get(*args, **kwargs):
144144
"get",
145145
lambda *args, **kwargs: aiohttp.client._RequestContextManager(mock_get()),
146146
)
147-
token = os.environ.get("IPINFO_LITE_TOKEN", "")
147+
token = os.environ.get("IPINFO_TOKEN", "")
148148
handler = AsyncHandlerLite(token)
149149
with pytest.raises(APIError) as exc_info:
150150
await handler.getDetails("8.8.8.8")
@@ -158,12 +158,12 @@ async def mock_get(*args, **kwargs):
158158

159159

160160
@pytest.mark.skipif(
161-
"IPINFO_LITE_TOKEN" not in os.environ,
161+
"IPINFO_TOKEN" not in os.environ,
162162
reason="Can't call Lite API without token",
163163
)
164164
@pytest.mark.asyncio
165165
async def test_bogon_details():
166-
token = os.environ.get("IPINFO_LITE_TOKEN", "")
166+
token = os.environ.get("IPINFO_TOKEN", "")
167167
handler = AsyncHandlerLite(token)
168168
details = await handler.getDetails("127.0.0.1")
169169
assert details.all == {"bogon": True, "ip": "127.0.0.1"}

tests/handler_lite_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ def test_headers():
2727

2828

2929
@pytest.mark.skipif(
30-
"IPINFO_LITE_TOKEN" not in os.environ,
30+
"IPINFO_TOKEN" not in os.environ,
3131
reason="Can't call Lite API without token",
3232
)
3333
def test_get_details():
34-
token = os.environ.get("IPINFO_LITE_TOKEN", "")
34+
token = os.environ.get("IPINFO_TOKEN", "")
3535
handler = HandlerLite(token)
3636
details = handler.getDetails("8.8.8.8")
3737
assert isinstance(details, Details)
@@ -61,11 +61,11 @@ def test_get_details():
6161

6262

6363
@pytest.mark.skipif(
64-
"IPINFO_LITE_TOKEN" not in os.environ,
64+
"IPINFO_TOKEN" not in os.environ,
6565
reason="Can't call Lite API without token",
6666
)
6767
def test_bogon_details():
68-
token = os.environ.get("IPINFO_LITE_TOKEN", "")
68+
token = os.environ.get("IPINFO_TOKEN", "")
6969
handler = HandlerLite(token)
7070
details = handler.getDetails("127.0.0.1")
7171
assert isinstance(details, Details)

0 commit comments

Comments
 (0)