mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refa: Test configs (#8220)
### What problem does this PR solve? - Move common constants (HOST_ADDRESS, INVALID_API_TOKEN, etc.) to configs.py - Update test imports to use centralized configs - Clean up duplicate constant definitions across test files This improves maintainability by centralizing configuration. ### Type of change - [x] Refactoring test case
This commit is contained in:
@ -16,7 +16,8 @@
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import pytest
|
||||
from common import INVALID_API_TOKEN, SESSION_WITH_CHAT_NAME_LIMIT, create_session_with_chat_assistant, delete_chat_assistants, list_session_with_chat_assistants
|
||||
from common import create_session_with_chat_assistant, delete_chat_assistants, list_session_with_chat_assistants
|
||||
from configs import INVALID_API_TOKEN, SESSION_WITH_CHAT_NAME_LIMIT
|
||||
from libs.auth import RAGFlowHttpApiAuth
|
||||
|
||||
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import pytest
|
||||
from common import INVALID_API_TOKEN, batch_add_sessions_with_chat_assistant, delete_session_with_chat_assistants, list_session_with_chat_assistants
|
||||
from common import batch_add_sessions_with_chat_assistant, delete_session_with_chat_assistants, list_session_with_chat_assistants
|
||||
from configs import INVALID_API_TOKEN
|
||||
from libs.auth import RAGFlowHttpApiAuth
|
||||
|
||||
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import pytest
|
||||
from common import INVALID_API_TOKEN, delete_chat_assistants, list_session_with_chat_assistants
|
||||
from common import delete_chat_assistants, list_session_with_chat_assistants
|
||||
from configs import INVALID_API_TOKEN
|
||||
from libs.auth import RAGFlowHttpApiAuth
|
||||
from utils import is_sorted
|
||||
|
||||
|
||||
@ -17,7 +17,8 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from random import randint
|
||||
|
||||
import pytest
|
||||
from common import INVALID_API_TOKEN, SESSION_WITH_CHAT_NAME_LIMIT, delete_chat_assistants, list_session_with_chat_assistants, update_session_with_chat_assistant
|
||||
from common import delete_chat_assistants, list_session_with_chat_assistants, update_session_with_chat_assistant
|
||||
from configs import INVALID_API_TOKEN, SESSION_WITH_CHAT_NAME_LIMIT
|
||||
from libs.auth import RAGFlowHttpApiAuth
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user