Exemplo n.º 1
0
def test_parse_int_invalid():
    from webob.descriptors import parse_int

    with pytest.raises(ValueError):
        parse_int("abc")
Exemplo n.º 2
0
def test_parse_int_emptystr():
    from webob.descriptors import parse_int

    val = parse_int("")
    assert val is None
Exemplo n.º 3
0
def test_parse_int():
    from webob.descriptors import parse_int

    val = parse_int("123")
    assert val == 123
Exemplo n.º 4
0
def test_parse_int_invalid():
    from webob.descriptors import parse_int
    with pytest.raises(ValueError):
        parse_int('abc')
Exemplo n.º 5
0
def test_parse_int_none():
    from webob.descriptors import parse_int

    val = parse_int(None)
    assert val is None
Exemplo n.º 6
0
def test_parse_int_emptystr():
    from webob.descriptors import parse_int
    val = parse_int('')
    assert val == None
Exemplo n.º 7
0
def test_parse_int():
    from webob.descriptors import parse_int
    val = parse_int('123')
    assert val == 123
Exemplo n.º 8
0
def test_parse_int():
    from webob.descriptors import parse_int
    val = parse_int('123')
    eq_(val, 123)
Exemplo n.º 9
0
def test_parse_int_none():
    from webob.descriptors import parse_int
    val = parse_int(None)
    assert val == None
Exemplo n.º 10
0
def test_parse_int_emptystr():
    from webob.descriptors import parse_int
    val = parse_int('')
    eq_(val, None)
Exemplo n.º 11
0
def test_parse_int_none():
    from webob.descriptors import parse_int
    val = parse_int(None)
    eq_(val, None)
Exemplo n.º 12
0
def test_parse_int():
    from webob.descriptors import parse_int
    val = parse_int('123')
    eq_(val, 123)
Exemplo n.º 13
0
def test_parse_int_emptystr():
    from webob.descriptors import parse_int
    val = parse_int('')
    eq_(val, None)
Exemplo n.º 14
0
def test_parse_int_none():
    from webob.descriptors import parse_int
    val = parse_int(None)
    eq_(val, None)