def test_bool_query_gets_inverted_internally():
    q = query.Bool(must_not=[query.Match(f=42)], must=[query.Match(g='v')])
    q = ~q

    assert q == query.Bool(must=[query.Match(f=42)], must_not=[query.Match(g='v')])
dataset/ETHPy150Open elastic/elasticsearch-dsl-py/test_elasticsearch_dsl/test_query.py/test_bool_query_gets_inverted_internally/original