mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-09-16 13:12:20 +02:00
security: fail closed on bearer endpoint credentials
This commit is contained in:
@@ -162,8 +162,10 @@ def test_bearer_session_lifecycle_routes_do_not_emit_webhook_or_event(monkeypatc
|
||||
assert result.model == "stored-model"
|
||||
|
||||
create_openai = _latest_endpoint(router, "/api/session/openai", "POST")
|
||||
openai_result = create_openai(request, name="OpenAI", model="gpt-4o", rag="false")
|
||||
assert openai_result["model"] == "gpt-4o"
|
||||
with pytest.raises(HTTPException) as exc:
|
||||
create_openai(request, name="OpenAI", model="gpt-4o", rag="false")
|
||||
assert exc.value.status_code == 403
|
||||
assert len(manager.sessions) == 1
|
||||
webhook_manager.fire_and_forget.assert_not_called()
|
||||
assert events == []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user