Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
8bc9a2df
Commit
8bc9a2df
authored
Apr 25, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(auth): use consistent warning log level and verify logging in tests
parent
bc5d548b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
kilo.py
aisbf/auth/kilo.py
+1
-1
test_kilo_oauth2.py
tests/auth/test_kilo_oauth2.py
+2
-1
No files found.
aisbf/auth/kilo.py
View file @
8bc9a2df
...
...
@@ -491,7 +491,7 @@ class KiloOAuth2:
if
self
.
credentials
and
self
.
credentials
.
get
(
'expires'
,
0
)
>
time
.
time
():
return
self
.
credentials
.
get
(
'access'
)
logger
.
error
(
"KiloOAuth2: Token expired"
)
logger
.
warning
(
"KiloOAuth2: Token expired"
)
return
None
def
is_authenticated
(
self
)
->
bool
:
...
...
tests/auth/test_kilo_oauth2.py
View file @
8bc9a2df
...
...
@@ -54,7 +54,7 @@ async def test_get_valid_token_with_refresh_returns_valid_token(temp_credentials
@
pytest
.
mark
.
asyncio
async
def
test_get_valid_token_with_refresh_returns_none_when_expired
(
temp_credentials_file
,
expired_credentials
):
async
def
test_get_valid_token_with_refresh_returns_none_when_expired
(
temp_credentials_file
,
expired_credentials
,
caplog
):
"""Test that get_valid_token_with_refresh returns None when token expired."""
with
open
(
temp_credentials_file
,
'w'
)
as
f
:
json
.
dump
(
expired_credentials
,
f
)
...
...
@@ -64,3 +64,4 @@ async def test_get_valid_token_with_refresh_returns_none_when_expired(temp_crede
token
=
await
oauth2
.
get_valid_token_with_refresh
()
assert
token
is
None
assert
"Token expired"
in
caplog
.
text
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment