@ -26,8 +26,9 @@ import pytest
from ansible . module_utils . network . common . utils import to_list , sort_list
from ansible . module_utils . network . common . utils import dict_diff , dict_merge
from ansible . module_utils . network . common . utils import conditional , Template
from ansible . module_utils . network . common . utils import to_masklen , to_netmask , to_subnet , to_ipv6_network
from ansible . module_utils . network . common . utils import is_masklen , is_netmask
from ansible . module_utils . common . network import (
to_masklen , to_netmask , to_subnet , to_ipv6_network , to_ipv6_subnet , is_masklen , is_netmask
)
def test_to_list ( ) :
@ -204,3 +205,9 @@ def test_to_ipv6_network():
assert ' 2001:db8:: ' == to_ipv6_network ( ' 2001:db8:: ' )
assert ' 2001:0db8:85a3:: ' == to_ipv6_network ( ' 2001:0db8:85a3:0000:0000:8a2e:0370:7334 ' )
assert ' 2001:0db8:85a3:: ' == to_ipv6_network ( ' 2001:0db8:85a3:0:0:8a2e:0370:7334 ' )
def test_to_ipv6_subnet ( ) :
assert ' 2001:db8:: ' == to_ipv6_subnet ( ' 2001:db8:: ' )
assert ' 2001:0db8:85a3:4242:: ' == to_ipv6_subnet ( ' 2001:0db8:85a3:4242:0000:8a2e:0370:7334 ' )
assert ' 2001:0db8:85a3:4242:: ' == to_ipv6_subnet ( ' 2001:0db8:85a3:4242:0:8a2e:0370:7334 ' )