mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 06:03:52 +00:00
set api_key to be the default namespace if the server returns no attributes
This commit is contained in:
parent
2692d73d7d
commit
6762e3f911
2 changed files with 7 additions and 3 deletions
|
|
@ -201,4 +201,6 @@ async def test_auth_middleware_no_attributes(mock_middleware, mock_scope):
|
|||
await middleware(mock_scope, mock_receive, mock_send)
|
||||
|
||||
assert "user_attributes" in mock_scope
|
||||
assert mock_scope["user_attributes"] == {}
|
||||
attributes = mock_scope["user_attributes"]
|
||||
assert "namespaces" in attributes
|
||||
assert attributes["namespaces"] == ["test-api-key"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue