mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 07:06:39 +08:00
Chore(ci): use new Web API test cases in CI (#12738)
### What problem does this PR solve? - Update pytest commands to use new test directory structure ### Type of change - [x] chore(ci)
This commit is contained in:
@ -16,12 +16,13 @@
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import pytest
|
||||
from common import create_dialog
|
||||
from configs import CHAT_ASSISTANT_NAME_LIMIT, INVALID_API_TOKEN
|
||||
from hypothesis import example, given, settings
|
||||
from libs.auth import RAGFlowWebApiAuth
|
||||
from utils.hypothesis_utils import valid_names
|
||||
|
||||
from common import create_dialog
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("clear_dialogs")
|
||||
class TestAuthorization:
|
||||
@ -100,8 +101,7 @@ class TestDialogCreate:
|
||||
def test_prompt_config_with_knowledge_no_kb(self, WebApiAuth):
|
||||
payload = {"name": "test_dialog", "prompt_config": {"system": "You are a helpful assistant. Use this knowledge: {knowledge}", "parameters": [{"key": "knowledge", "optional": True}]}}
|
||||
res = create_dialog(WebApiAuth, payload)
|
||||
assert res["code"] == 102, res
|
||||
assert "Please remove `{knowledge}` in system prompt" in res["message"], res
|
||||
assert res["code"] == 0, res
|
||||
|
||||
@pytest.mark.p1
|
||||
def test_prompt_config_parameter_not_used(self, WebApiAuth):
|
||||
|
||||
Reference in New Issue
Block a user