fix: improve maintenance and synchronize live conversations
This commit is contained in:
1 parent
bb541bd212
commit
ef86a5d3af
297 files changed
+2983
-1274
No files matched your search
@@ -22,10 +22,7 @@ from app.models.user import User, UserGroup
|
||||
from app.models.agent import Agent, AgentCustomization, AgentType
|
||||
from app.models.role import Role
|
||||
from app.models.permission import Permission, role_permissions
|
||||
from uuid import UUID, uuid4
|
||||
from datetime import datetime
|
||||
import os
|
||||
from typing import Dict, Generator
|
||||
from uuid import uuid4
|
||||
from app.api import agent as agent_router
|
||||
from app.core.auth import get_current_user, require_permissions, get_unified_auth
|
||||
from app.models.schemas.agent_customization import CustomizationCreate
|
||||
@@ -705,7 +702,7 @@ def test_customization_response_signs_photo_url_without_persisting_it(
|
||||
instance, which SQLAlchemy then flushed, so stored URLs carried a signature
|
||||
that eventually expired.
|
||||
"""
|
||||
from unittest.mock import AsyncMock, patch, MagicMock
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
stored_url = "https://bucket.s3.us-east-1.amazonaws.com/agents/photo.png"
|
||||
signed_url = f"{stored_url}?AWSAccessKeyId=A&Signature=S&Expires=1"
|
||||
@@ -1261,7 +1258,7 @@ def test_generate_instructions_ai_error(
|
||||
"existing_instructions": []
|
||||
}
|
||||
|
||||
from unittest.mock import patch, AsyncMock, MagicMock
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
# Create valid AI config mock
|
||||
mock_config = MagicMock()
|
||||
@@ -1289,10 +1286,6 @@ def test_generate_instructions_rate_limiting(
|
||||
"""Test rate limiting on instruction generation endpoint"""
|
||||
from unittest.mock import patch
|
||||
|
||||
prompt_data = {
|
||||
"prompt": "Create helpful instructions",
|
||||
"existing_instructions": []
|
||||
}
|
||||
|
||||
# Mock rate limiting decorator to raise exception
|
||||
with patch('app.utils.rate_limit.limit_instruction_generation') as mock_limit:
|
||||
|
||||
Reference in new issue
Block a user