

def test_two_bool_queries_append_one_to_should_if_possible():
    q1 = query.Bool(should=[query.Match(f='v')])
    q2 = query.Bool(must=[query.Match(f='v')])
    assert ((q1 | q2) == query.Bool(should=[query.Match(f='v'), query.Bool(must=[query.Match(f='v')])]))
    assert ((q2 | q1) == query.Bool(should=[query.Match(f='v'), query.Bool(must=[query.Match(f='v')])]))

dataset/ETHPy150Open elastic/elasticsearch-dsl-py/test_elasticsearch_dsl/test_query.py test_two_bool_queries_append_one_to_should_if_possible/original