def test_inverted_query_becomes_bool_with_must_not():
    q = query.Match(f=42)
    q = ~q

    assert q == query.Bool(must_not=[query.Match(f=42)])
dataset/ETHPy150Open elastic/elasticsearch-dsl-py/test_elasticsearch_dsl/test_query.py/test_inverted_query_becomes_bool_with_must_not/original