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

    # And there are records
    add_document("foo", {"bar": "baz"})

    # And I do a search
    results = t[0:1]

    # Then I get a the expected results
    len(results).should.equal(1)
    results[0]['_source'].should.equal({"bar": "baz"})
Search with match_all query
dataset/ETHPy150Open Yipit/pyeqs/tests/functional/test_queryset.py/test_simple_search