def test_query_and_query_creates_bool():
    q1 = query.Match(f=42)
    q2 = query.Match(g=47)

    q = q1 & q2
    assert isinstance(q, query.Bool)
    assert q.must == [q1, q2]
dataset/ETHPy150Open elastic/elasticsearch-dsl-py/test_elasticsearch_dsl/test_query.py/test_query_and_query_creates_bool/original