From a736c5652d34101304db1acab102f3a7a6c8d741 Mon Sep 17 00:00:00 2001 From: Andreas Gabriel Date: Fri, 20 May 2016 16:45:35 +0200 Subject: [PATCH] Fix testReindex to use _checkApply for search tests --- src/Products/PluginIndexes/FieldIndex/tests.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Products/PluginIndexes/FieldIndex/tests.py b/src/Products/PluginIndexes/FieldIndex/tests.py index 43f3623d..2a31adfd 100644 --- a/src/Products/PluginIndexes/FieldIndex/tests.py +++ b/src/Products/PluginIndexes/FieldIndex/tests.py @@ -208,18 +208,15 @@ def testNone(self): def testReindex(self): self._populateIndex() - result, used = self._index._apply_index({'foo': 'abc'}) - assert list(result) == [2] + self._checkApply({'foo': 'abc'}, [self._values[2], ]) assert self._index.keyForDocument(2) == 'abc' d = Dummy('world') self._index.index_object(2, d) - result, used = self._index._apply_index({'foo': 'world'}) - assert list(result) == [2] + self._checkApply({'foo': 'world'}, [(2, d), ]) assert self._index.keyForDocument(2) == 'world' del d._foo self._index.index_object(2, d) - result, used = self._index._apply_index({'foo': 'world'}) - assert list(result) == [] + self._checkApply({'foo': 'world'}, []) try: should_not_be = self._index.keyForDocument(2) except KeyError: