From 28b5771c2c04f02bdb4743ec555336a05b1e8675 Mon Sep 17 00:00:00 2001 From: NicoYuan1986 <109071306+NicoYuan1986@users.noreply.github.com> Date: Thu, 15 Dec 2022 09:41:23 +0800 Subject: [PATCH] Update test case of output empty search field (#21231) Signed-off-by: nico Signed-off-by: nico --- tests/python_client/testcases/test_query.py | 2 +- tests/python_client/testcases/test_search.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/python_client/testcases/test_query.py b/tests/python_client/testcases/test_query.py index 50247ed8fa..515785fa8e 100644 --- a/tests/python_client/testcases/test_query.py +++ b/tests/python_client/testcases/test_query.py @@ -536,7 +536,7 @@ class TestQueryParams(TestcaseBase): method: query with output field=None, field=[] expected: return primary field """ - collection_w, vectors = self.init_collection_general(prefix, insert_data=True)[0:2] + collection_w = self.init_collection_general(prefix, insert_data=True)[0] for fields in [None, []]: res, _ = collection_w.query(default_term_expr, output_fields=fields) assert res[0].keys() == {ct.default_int64_field_name} diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 608f87f960..af3df90631 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -2371,6 +2371,7 @@ class TestCollectionSearch(TestcaseBase): res.done() res = res.result() assert len(res[0][0].entity._row_data) == 0 + assert res[0][0].entity.fields == [] @pytest.mark.tags(CaseLabel.L1) def test_search_with_output_field(self, auto_id, _async):