Ejemplo n.º 1
0
def test_message_matches_returns_true_with_string():
    func = check.message_matches('bar')
    assert func(Exception('bob barker'), 1)
Ejemplo n.º 2
0
def test_message_matches_returns_false_with_string():
    func = check.message_matches('foo')
    assert not func(Exception('bob barker'), 1)
Ejemplo n.º 3
0
def test_message_matches_returns_false_with_regex():
    func = check.message_matches(re.compile('foo'))
    assert not func(Exception('bob barker'), 1)