Skip to content

Commit 94939d7

Browse files
authored
Do a smaller auth check at authentication (#166)
1 parent 24886f7 commit 94939d7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/python_opensky/opensky.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def authenticate(
4949
"""Authenticate the user."""
5050
self._auth = auth
5151
try:
52-
await self.get_states()
52+
await self.get_states(bounding_box=BoundingBox(0.0, 0.0, 1.0, 1.0))
5353
except OpenSkyUnauthenticatedError as exc:
5454
self._auth = None
5555
raise OpenSkyUnauthenticatedError from exc

tests/test_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ async def test_own_states(
120120
response: StatesResponse = await opensky.get_own_states()
121121
assert len(response.states) == 4
122122
assert opensky.opensky_credits == 8000
123-
assert opensky.remaining_credits() == 7996
123+
assert opensky.remaining_credits() == 7999
124124
await opensky.close()
125125

126126

0 commit comments

Comments
 (0)