From e4c755583ed5f8aac2b36fd834dde18e111ae886 Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Fri, 15 Oct 2021 20:33:07 +0800 Subject: [PATCH] [skip ci] Add skipped delete case (#9990) Signed-off-by: ThreadDao --- .../python_client/testcases/test_delete_20.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/python_client/testcases/test_delete_20.py b/tests/python_client/testcases/test_delete_20.py index ccf3b77d68..5b8ad67577 100644 --- a/tests/python_client/testcases/test_delete_20.py +++ b/tests/python_client/testcases/test_delete_20.py @@ -98,6 +98,35 @@ class TestDeleteParams(TestcaseBase): collection_w.delete(expr) assert collection_w.num_entities == ct.default_nb + @pytest.mark.skip(reason="Delete function is not implemented") + @pytest.mark.tags(CaseLabel.L1) + def test_delete_expr_single(self): + """ + target: test delete with one value + method: delete with expr: "id in [0]" + expected: Describe num entities by one + """ + # init collection with tmp_nb default data + collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0] + expr = f'{ct.default_int64_field_name} in {[0]}' + collection_w.delete(expr) + assert collection_w.num_entities == tmp_nb - 1 + + @pytest.mark.skip(reason="Delete function is not implemented") + @pytest.mark.tags(CaseLabel.L1) + def test_delete_expr_all_values(self): + """ + target: test delete with all values + method: delete with expr: "id in [all]" + expected: num entities becomes zero + """ + # init collection with default_nb default data + collection_w, _, _, ids = self.init_collection_general(prefix, insert_data=True) + expr = f'{ct.default_int64_field_name} in {ids[0]}' + collection_w.delete(expr) + assert collection_w.num_entities == 0 + assert collection_w.is_empty + @pytest.mark.skip(reason="Waiting for development") class TestDeleteOperation(TestcaseBase):