@scenario(prepare_data, cleanup_data)
def test_wrappers(context):
    # When create a queryset
    t = QuerySet("localhost", index="foo")

    # And there are records
    add_document("foo", {"bar": 1})
    add_document("foo", {"bar": 2})
    add_document("foo", {"bar": 3})

    # And I do a search
    def wrapper_function(search_results):
        return list(map(lambda x: x['_source']['bar'] + 1, search_results))
    t.wrappers(wrapper_function)
    t.order_by(Sort("bar", order="asc"))
    results = t[0:10]

    # Then I get a the expected results
    len(results).should.equal(3)
    results[0].should.equal(2)
    results[1].should.equal(3)
    results[2].should.equal(4)
Process a2x command.
dataset/ETHPy150Open Yipit/pyeqs/tests/functional/test_queryset.py/test_wrappers--crossover with--dataset/ETHPy150Open FooBarWidget/mizuho/asciidoc/a2x.py/A2X.execute