mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 08:35:08 +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:
@ -27,7 +27,7 @@ from utils.hypothesis_utils import valid_names
|
||||
|
||||
@pytest.mark.usefixtures("clear_datasets")
|
||||
class TestAuthorization:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.parametrize(
|
||||
"invalid_auth, expected_message",
|
||||
[
|
||||
@ -117,7 +117,7 @@ class TestDatasetCreate:
|
||||
}
|
||||
client.create_dataset(**payload)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
def test_avatar_exceeds_limit_length(self, client):
|
||||
payload = {"name": "avatar_exceeds_limit_length", "avatar": "a" * 65536}
|
||||
with pytest.raises(Exception) as exception_info:
|
||||
@ -157,7 +157,7 @@ class TestDatasetCreate:
|
||||
dataset = client.create_dataset(**payload)
|
||||
assert dataset.description == "description", str(dataset)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
def test_description_exceeds_limit_length(self, client):
|
||||
payload = {"name": "description_exceeds_limit_length", "description": "a" * 65536}
|
||||
with pytest.raises(Exception) as exception_info:
|
||||
@ -245,7 +245,7 @@ class TestDatasetCreate:
|
||||
dataset = client.create_dataset(**payload)
|
||||
assert dataset.embedding_model == "BAAI/bge-small-en-v1.5@Builtin", str(dataset)
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.parametrize(
|
||||
"name, permission",
|
||||
[
|
||||
|
||||
@ -23,7 +23,7 @@ from ragflow_sdk import RAGFlow
|
||||
|
||||
|
||||
class TestAuthorization:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.parametrize(
|
||||
"invalid_auth, expected_message",
|
||||
[
|
||||
@ -79,7 +79,7 @@ class TestDatasetsDelete:
|
||||
datasets = client.list_datasets()
|
||||
assert len(datasets) == remaining, str(datasets)
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.usefixtures("add_dataset_func")
|
||||
def test_ids_empty(self, client):
|
||||
payload = {"ids": []}
|
||||
@ -88,7 +88,7 @@ class TestDatasetsDelete:
|
||||
datasets = client.list_datasets()
|
||||
assert len(datasets) == 1, str(datasets)
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p3
|
||||
@pytest.mark.usefixtures("add_datasets_func")
|
||||
def test_ids_none(self, client):
|
||||
payload = {"ids": None}
|
||||
@ -167,7 +167,7 @@ class TestDatasetsDelete:
|
||||
client.delete_datasets(**payload)
|
||||
assert "lacks permission for dataset" in str(exception_info.value), str(exception_info.value)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
@pytest.mark.usefixtures("add_dataset_func")
|
||||
def test_field_unsupported(self, client):
|
||||
payload = {"unknown_field": "unknown_field"}
|
||||
|
||||
@ -22,7 +22,7 @@ from ragflow_sdk import RAGFlow
|
||||
|
||||
|
||||
class TestAuthorization:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.parametrize(
|
||||
"invalid_auth, expected_message",
|
||||
[
|
||||
@ -54,7 +54,7 @@ class TestCapability:
|
||||
|
||||
@pytest.mark.usefixtures("add_datasets")
|
||||
class TestDatasetsList:
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
def test_params_unset(self, client):
|
||||
datasets = client.list_datasets()
|
||||
assert len(datasets) == 5, str(datasets)
|
||||
@ -135,7 +135,7 @@ class TestDatasetsList:
|
||||
client.list_datasets(**params)
|
||||
assert "not instance of" in str(exception_info.value), str(exception_info.value)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
@pytest.mark.parametrize(
|
||||
"params",
|
||||
[
|
||||
@ -171,7 +171,7 @@ class TestDatasetsList:
|
||||
client.list_datasets(**params)
|
||||
assert "not instance of" in str(exception_info.value), str(exception_info.value)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
@pytest.mark.parametrize(
|
||||
"params",
|
||||
[
|
||||
@ -306,7 +306,7 @@ class TestDatasetsList:
|
||||
client.list_datasets(**params)
|
||||
assert "lacks permission for dataset" in str(exception_info.value), str(exception_info.value)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
def test_field_unsupported(self, client):
|
||||
params = {"unknown_field": "unknown_field"}
|
||||
with pytest.raises(Exception) as exception_info:
|
||||
|
||||
@ -105,7 +105,7 @@ class TestDatasetUpdate:
|
||||
retrieved_dataset = client.get_dataset(name=dataset.name)
|
||||
assert retrieved_dataset.avatar == avatar_data, str(retrieved_dataset)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
def test_avatar_exceeds_limit_length(self, add_dataset_func):
|
||||
dataset = add_dataset_func
|
||||
with pytest.raises(Exception) as exception_info:
|
||||
@ -148,7 +148,7 @@ class TestDatasetUpdate:
|
||||
retrieved_dataset = client.get_dataset(name=dataset.name)
|
||||
assert retrieved_dataset.description == "description", str(retrieved_dataset)
|
||||
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.p3
|
||||
def test_description_exceeds_limit_length(self, add_dataset_func):
|
||||
dataset = add_dataset_func
|
||||
with pytest.raises(Exception) as exception_info:
|
||||
@ -235,7 +235,7 @@ class TestDatasetUpdate:
|
||||
retrieved_dataset = client.get_dataset(name=dataset.name)
|
||||
assert retrieved_dataset.embedding_model == "BAAI/bge-small-en-v1.5@Builtin", str(retrieved_dataset)
|
||||
|
||||
@pytest.mark.p1
|
||||
@pytest.mark.p2
|
||||
@pytest.mark.parametrize(
|
||||
"permission",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user