Test: Add web API test suite for knowledge base operations (#8254)

### What problem does this PR solve?

- Implement RAGFlowWebApiAuth class for web API authentication
- Add comprehensive test cases for KB CRUD operations
- Set up common fixtures and utilities in conftest.py
- Add helper functions in common.py for web API requests

The changes establish a complete testing framework for knowledge base
management via web API endpoints.

### Type of change

- [x] Add test case
This commit is contained in:
Liu An
2025-06-13 16:39:10 +08:00
committed by GitHub
parent 8f9e7a6f6f
commit 64af09ce7b
11 changed files with 1030 additions and 5 deletions

View File

@ -23,3 +23,12 @@ class RAGFlowHttpApiAuth(AuthBase):
def __call__(self, r):
r.headers["Authorization"] = f"Bearer {self._token}"
return r
class RAGFlowWebApiAuth(AuthBase):
def __init__(self, token):
self._token = token
def __call__(self, r):
r.headers["Authorization"] = self._token
return r