Exemple #1
0
def test_validate_ipv4_fail():
    assert not validate_ipv4('fe80::250:56ff:febf:1a0a')
Exemple #2
0
def test_validate_ipv4_no_inet_pton_fail(inet_pton):
    inet_pton.side_effect = AttributeError
    assert not validate_ipv4('fe80::250:56ff:febf:1a0a')
Exemple #3
0
def test_validate_ipv4_success():
    assert validate_ipv4('127.0.0.1'), True
Exemple #4
0
def test_validate_ipv4_no_inet_pton_success(inet_pton):
    inet_pton.side_effect = AttributeError
    assert validate_ipv4('127.0.0.1')