from dhlab.metadata.natbib2 import QueryBuilder

def test_querybuilder():
    b = QueryBuilder()
    res = b.add_field("100",  "a", "Ibsen").add_field("700", "a", "Ibsen").add_field("008", value="eng").set_return_fields("fields.100").set_limit(100).post()
    assert isinstance(res, list)
    assert len(res) > 0