Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False
def test_predicate_not(mockevent):
assert Not(1).predicate == 1
assert ~Or(1, 2) == Not(Or(1, 2))
assert ~And(1, 2) == Not(And(1, 2))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert ~Not(1) == 1
assert ~Query(module=1) | ~Query(module=2) == Not(And(Query(module=1), Query(module=2)))
assert ~Query(module=1) & ~Query(module=2) == Not(Or(Query(module=1), Query(module=2)))
assert ~Query(module=1) | Query(module=2) == Or(Not(Query(module=1)), Query(module=2))
assert ~Query(module=1) & Query(module=2) == And(Not(Query(module=1)), Query(module=2))
assert ~(Query(module=1) & Query(module=2)) == Not(And(Query(module=1), Query(module=2)))
assert ~(Query(module=1) | Query(module=2)) == Not(Or(Query(module=1), Query(module=2)))
assert repr(~Or(1, 2)) == repr(Not(Or(1, 2)))
assert repr(~And(1, 2)) == repr(Not(And(1, 2)))
assert repr(~Query(module=1) | ~Query(module=2)) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~Query(module=1) & ~Query(module=2)) == repr(Not(Or(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) & Query(module=2))) == repr(Not(And(Query(module=1), Query(module=2))))
assert repr(~(Query(module=1) | Query(module=2))) == repr(Not(Or(Query(module=1), Query(module=2))))
assert Not(Q(module=__name__))(mockevent) == False