# Path: luna/utils/ip.py
# def ntoa(num_ip, ver=4):
# def aton(ip, ver=4):
# def reltoa(num_net, rel_ip, ver):
# def atorel(ip, num_net, prefix, ver=4):
# def get_num_subnet(ip, prefix, ver=4):
# def ip_in_net(ip, num_net, prefix, ver=4):
# def guess_ns_hostname():
# def get_ip_version(ip):
# def ipv6_unwrap(ip):


from mock import patch
from luna.utils import ip
import unittest
        self.assertEqual(
            ip.ntoa(336389205813283084628800618700287770625, 6),
            'fd12:3456:789a:1::1'
        )

    def test_ntoa_with_invalid_absnum(self):
        self.assertRaises(
            RuntimeError,
            ip.ntoa,
            340282366920938463463374607431768211456,
            6
        )

    def test_get_num_subnet_with_valid_input(self):
        num_subnet = ip.get_num_subnet('fd12:3456:789a:1::1', 64, 6)
        self.assertEqual(
            num_subnet,
            336389205813283084628800618700287770624
        )

    def test_get_num_subnet_with_invalid_prefix(self):
        self.assertRaises(
            RuntimeError,
            ip.get_num_subnet,
            'fd12:3456:789a:1::1', 129, 6
        )

    def test_get_num_subnet_with_invalid_address(self):
        self.assertRaises(
            RuntimeError,

# Path: luna/utils/ip.py
# def ntoa(num_ip, ver=4):
# def aton(ip, ver=4):
# def reltoa(num_net, rel_ip, ver):
# def atorel(ip, num_net, prefix, ver=4):
# def get_num_subnet(ip, prefix, ver=4):
# def ip_in_net(ip, num_net, prefix, ver=4):
# def guess_ns_hostname():
# def get_ip_version(ip):
# def ipv6_unwrap(ip):


# Path: tests/unittests/test_utils_ip.py
from mock import patch
from luna.utils import ip
import unittest

        self.assertEqual(
            ip.ntoa(336389205813283084628800618700287770625, 6),
            'fd12:3456:789a:1::1'
        )

    def test_ntoa_with_invalid_absnum(self):
        self.assertRaises(
            RuntimeError,
            ip.ntoa,
            340282366920938463463374607431768211456,
            6
        )

    def test_get_num_subnet_with_valid_input(self):
        num_subnet = ip.get_num_subnet('fd12:3456:789a:1::1', 64, 6)
        self.assertEqual(
            num_subnet,
            336389205813283084628800618700287770624
        )

    def test_get_num_subnet_with_invalid_prefix(self):
        self.assertRaises(
            RuntimeError,
            ip.get_num_subnet,
            'fd12:3456:789a:1::1', 129, 6
        )

    def test_get_num_subnet_with_invalid_address(self):
        self.assertRaises(
            RuntimeError,

            ip.get_num_subnet,