From 75a86bc2d3257d4b81c1c56aaa5e676afbb6b9cb Mon Sep 17 00:00:00 2001 From: nico <109071306+NicoYuan1986@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:23:10 +0800 Subject: [PATCH] test: update test cases (#31253) Signed-off-by: nico --- .../python_client/testcases/test_collection.py | 18 +++++++++--------- tests/python_client/testcases/test_delete.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/python_client/testcases/test_collection.py b/tests/python_client/testcases/test_collection.py index 673f986c2d9b9..288203029dacb 100644 --- a/tests/python_client/testcases/test_collection.py +++ b/tests/python_client/testcases/test_collection.py @@ -3072,7 +3072,7 @@ def test_collection_describe(self): 'element_type': 0}, {'field_id': 104, 'name': 'float_vector', 'description': '', 'type': 101, 'params': {'dim': 128}, 'element_type': 0}], - 'aliases': [], 'consistency_level': 0, 'properties': {}, 'num_partitions': 1} + 'aliases': [], 'consistency_level': 0, 'properties': {}, 'num_partitions': 1, 'enable_dynamic_field': False} res = collection_w.describe()[0] del res['collection_id'] log.info(res) @@ -4040,21 +4040,21 @@ def test_collection_array_field_all_datatype(self): {"field_id": 101, "name": "float_vector", "description": "", "type": 101, "params": {"dim": ct.default_dim}, "element_type": 0}, {"field_id": 102, "name": "int8_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 2}, + "params": {"max_capacity": 2000}, "element_type": 2}, {"field_id": 103, "name": "int16_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 3}, + "params": {"max_capacity": 2000}, "element_type": 3}, {"field_id": 104, "name": "int32_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 4}, + "params": {"max_capacity": 2000}, "element_type": 4}, {"field_id": 105, "name": "int64_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 5}, + "params": {"max_capacity": 2000}, "element_type": 5}, {"field_id": 106, "name": "bool_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 1}, + "params": {"max_capacity": 2000}, "element_type": 1}, {"field_id": 107, "name": "float_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 10}, + "params": {"max_capacity": 2000}, "element_type": 10}, {"field_id": 108, "name": "double_array", "description": "", "type": 22, - "params": {"max_capacity": "2000"}, "element_type": 11}, + "params": {"max_capacity": 2000}, "element_type": 11}, {"field_id": 109, "name": "string_array", "description": "", "type": 22, - "params": {"max_length": "100", "max_capacity": "2000"}, "element_type": 21} + "params": {"max_length": 100, "max_capacity": 2000}, "element_type": 21} ] assert res["fields"] == fields diff --git a/tests/python_client/testcases/test_delete.py b/tests/python_client/testcases/test_delete.py index f729e31fde304..a741191b71921 100644 --- a/tests/python_client/testcases/test_delete.py +++ b/tests/python_client/testcases/test_delete.py @@ -108,7 +108,7 @@ def test_delete_expr_none(self): """ # init collection with tmp_nb default data collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0] - error = {ct.err_code: 0, ct.err_msg: "expr cannot be None"} + error = {ct.err_code: 1, ct.err_msg: "expr cannot be None"} collection_w.delete(expr=None, check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) @@ -121,7 +121,7 @@ def test_delete_expr_non_string(self, expr): """ # init collection with tmp_nb default data collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0] - error = {ct.err_code: 0, ct.err_msg: f"expr value {expr} is illegal"} + error = {ct.err_code: 1, ct.err_msg: f"expr value {expr} is illegal"} collection_w.delete(expr, check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2)