def test_int_or_none_fail():
    from pyramid_authsanity.util import int_or_none

    with raises(ValueError):
        int_or_none('test')
def test_int_or_none_int():
    from pyramid_authsanity.util import int_or_none

    assert 1 == int_or_none(1)
def test_int_or_none_none():
    from pyramid_authsanity.util import int_or_none

    assert None == int_or_none(None)
def test_int_or_none_fail():
    from pyramid_authsanity.util import int_or_none

    with raises(ValueError):
        int_or_none('test')
def test_int_or_none_int():
    from pyramid_authsanity.util import int_or_none

    assert 1 == int_or_none(1)
def test_int_or_none_none():
    from pyramid_authsanity.util import int_or_none

    assert None == int_or_none(None)