def test_unindex_objects(self, get_es_mock): model = MagicMock() unindex_objects(model, [1, 2, 3], 'foo') ok_(model.unindex.called) model.assert_has_calls([ call.unindex(es=get_es_mock(), public_index='foo', id=1), call.unindex(es=get_es_mock(), public_index='foo', id=2), call.unindex(es=get_es_mock(), public_index='foo', id=3)])
def test_unindex_objects(self, get_es_mock): mapping_type = MagicMock() unindex_objects(mapping_type, [1, 2, 3], 'foo') ok_(mapping_type.unindex.called) mapping_type.assert_has_calls([ call.unindex(1, es=get_es_mock(), public_index='foo'), call.unindex(2, es=get_es_mock(), public_index='foo'), call.unindex(3, es=get_es_mock(), public_index='foo')])
def test_unindex_objects(self, get_es_mock): model = MagicMock() unindex_objects(model, [1, 2, 3], 'foo') ok_(model.unindex.called) model.assert_has_calls([ call.unindex(es=get_es_mock(), public_index='foo', id=1), call.unindex(es=get_es_mock(), public_index='foo', id=2), call.unindex(es=get_es_mock(), public_index='foo', id=3) ])