mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 00:25:06 +08:00
Fix(test): downgrade test priorities (#12913)
### What problem does this PR solve? Changed test priorities in multiple test files, downgrading from p1 to p2 and p2 to p3. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -25,7 +25,7 @@ from configs import EMAIL, HOST_ADDRESS, PASSWORD, VERSION
|
||||
|
||||
|
||||
class TestDeleteUserApiKey:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_delete_user_api_key_success(self, admin_session: requests.Session) -> None:
|
||||
"""Test successfully deleting an API key for a user"""
|
||||
user_name: str = EMAIL
|
||||
@ -45,7 +45,7 @@ class TestDeleteUserApiKey:
|
||||
message: str = delete_response.get("message", "")
|
||||
assert message == "API key deleted successfully", f"Message should indicate success, got: {message}"
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_user_api_key_removed_from_list_after_deletion(self, admin_session: requests.Session) -> None:
|
||||
"""Test that deleted API key is removed from the list"""
|
||||
user_name: str = EMAIL
|
||||
|
||||
@ -25,7 +25,7 @@ from configs import EMAIL
|
||||
|
||||
|
||||
class TestGenerateUserApiKey:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_generate_user_api_key_success(self, admin_session: requests.Session) -> None:
|
||||
"""Test successfully generating API key for a user"""
|
||||
# Use the test user email (get_user_details expects email)
|
||||
@ -63,7 +63,7 @@ class TestGenerateUserApiKey:
|
||||
token_without_prefix: str = token.replace("ragflow-", "")[:32]
|
||||
assert beta != token_without_prefix, "Beta should be independently generated, not derived from token"
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_generate_user_api_key_appears_in_list(self, admin_session: requests.Session) -> None:
|
||||
"""Test that generated API key appears in get_user_api_key list"""
|
||||
user_name: str = EMAIL
|
||||
@ -84,7 +84,7 @@ class TestGenerateUserApiKey:
|
||||
token_found: bool = any(key.get("token") == token for key in api_keys)
|
||||
assert token_found, "Generated API key should appear in the list"
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_generate_user_api_key_response_structure(self, admin_session: requests.Session) -> None:
|
||||
"""Test that generate_user_api_key returns correct response structure"""
|
||||
user_name: str = EMAIL
|
||||
|
||||
@ -25,7 +25,7 @@ from configs import EMAIL
|
||||
|
||||
|
||||
class TestGetUserApiKey:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_get_user_api_key_success(self, admin_session: requests.Session) -> None:
|
||||
"""Test successfully getting API keys for a user with correct response structure"""
|
||||
user_name: str = EMAIL
|
||||
|
||||
Reference in New Issue
Block a user