diff --git a/tests/python_client/milvus_client/test_milvus_client_delete.py b/tests/python_client/milvus_client/test_milvus_client_delete.py index 489e69749c849..56a4cde46f12c 100644 --- a/tests/python_client/milvus_client/test_milvus_client_delete.py +++ b/tests/python_client/milvus_client/test_milvus_client_delete.py @@ -107,7 +107,6 @@ def test_milvus_client_delete_with_invalid_id_type(self): "err_msg": "expr cannot be empty"}) @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1870") def test_milvus_client_delete_with_not_all_required_params(self): """ target: test delete (high level api) @@ -121,8 +120,8 @@ def test_milvus_client_delete_with_not_all_required_params(self): # 2. delete client_w.delete(client, collection_name, check_task=CheckTasks.err_res, - check_items={"err_code": 1, - "err_msg": "expr cannot be empty"}) + check_items={"err_code": 999, + "err_msg": "The type of expr must be string ,but is given."}) class TestMilvusClientDeleteValid(TestcaseBase): diff --git a/tests/python_client/testcases/test_delete.py b/tests/python_client/testcases/test_delete.py index 56646ceb94c03..813acd51fbc7b 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: 1, ct.err_msg: "expr cannot be None"} + error = {ct.err_code: 999, ct.err_msg: "Illegal str variables: {'filter': None}, expect non-empty str"} collection_w.delete(expr=None, check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) @@ -121,7 +121,8 @@ 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: 1, ct.err_msg: f"expr value {expr} is illegal"} + error = {ct.err_code: 999, ct.err_msg: "Illegal str variables: {'filter': %s}, expect non-empty str" + % str(expr)} collection_w.delete(expr, check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) @@ -312,7 +313,8 @@ def test_delete_non_string_partition_name(self, partition_name): collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0] error = {ct.err_code: 0, - ct.err_msg: f"partition_name value {partition_name} is illegal"} + ct.err_msg: "Illegal nullable str variables: {'partition_name': %s}, " + "expect None or non-empty str" % str(partition_name)} collection_w.delete(tmp_expr, partition_name=partition_name, check_task=CheckTasks.err_res, check_items=error) @@ -2069,7 +2071,7 @@ def test_delete_expr_empty_string(self): collection_w = self.init_collection_general(prefix, True)[0] # delete - error = {ct.err_code: 1, ct.err_msg: "expr cannot be empty"} + error = {ct.err_code: 1, ct.err_msg: "Illegal str variables: {'filter': ''}, expect non-empty str"} collection_w.delete(expr="", check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) diff --git a/tests/python_client/testcases/test_partition_key.py b/tests/python_client/testcases/test_partition_key.py index d630b32691e7f..30b2838204a1e 100644 --- a/tests/python_client/testcases/test_partition_key.py +++ b/tests/python_client/testcases/test_partition_key.py @@ -496,7 +496,7 @@ def test_partition_key_insert_invalid_data(self, invalid_data): float_vec_values = gen_vectors(nb, ct.default_dim) data = [pk_values, int64_values, string_values, float_vec_values] - err_msg = "expect string input" + err_msg = "field (varchar) expect string input" collection_w.insert(data, check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg})