示例#1
0
def test_compound_filter(varset_message, varset_callid_message, agentcalled_message):
    message_filter = Filter(event="varset", variable="call_id")
    assert not message_filter.match(varset_message)
    assert message_filter.match(varset_callid_message)
    assert not message_filter.match(agentcalled_message)
示例#2
0
def test_basic_filter(varset_message, varset_callid_message, agentcalled_message):
    message_filter = Filter(event="varset")
    assert message_filter.match(varset_message)
    assert message_filter.match(varset_callid_message)
    assert not message_filter.match(agentcalled_message)