def test_ipv4_to_int():
    base = thrift.ipv4_to_int('127.0.0.1')
    assert thrift.ipv4_to_int('localhost') == base
    assert thrift.ipv4_to_int('::1') == base
    assert thrift.ipv4_to_int('a:b:1') == 0
示例#2
0
def test_ipv4_to_int():
    base = thrift.ipv4_to_int('127.0.0.1')
    assert thrift.ipv4_to_int('localhost') == base
    assert thrift.ipv4_to_int('::1') == base
    assert thrift.ipv4_to_int('a:b:1') == 0