Ejemplo n.º 1
0
def test_raise_common_default():
    with pytest.raises(BatfishAssertException) as e:
        _raise_common("foobar")
    assert "foobar" in str(e.value)

    with pytest.raises(BatfishAssertException) as e:
        _raise_common("foobaragain", False)
    assert "foobaragain" in str(e.value)
Ejemplo n.º 2
0
def test_raise_common_warn():
    with pytest.warns(BatfishAssertWarning):
        _raise_common("foobar", True)
Ejemplo n.º 3
0
def test_raise_common_warn():
    with pytest.warns(BatfishAssertWarning):
        result = _raise_common("foobar", True)
    assert not result