salt/tests/unit/utils/test_zeromq.py
Erik Johnson 1e2e2b6ac5
Move 5 functions from salt.utils
These functions are:

- salt.utils.ip_bracket -> salt.utils.zeromq.ip_bracket
- salt.utils.gen_mac -> salt.utils.network.gen_mac
- salt.utils.mac_str_to_bytes -> salt.utils.network.mac_str_to_bytes
- salt.utils.refresh_dns -> salt.utils.network.refresh_dns
- salt.utils.dns_check -> salt.utils.network.dns_check
2017-10-12 09:07:00 -05:00

22 lines
521 B
Python

# -*- coding: utf-8 -*-
'''
Test salt.utils.zeromq
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.unit import TestCase
# Import salt libs
import salt.utils.zeromq
class UtilsTestCase(TestCase):
def test_ip_bracket(self):
test_ipv4 = '127.0.0.1'
test_ipv6 = '::1'
self.assertEqual(test_ipv4, salt.utils.zeromq.ip_bracket(test_ipv4))
self.assertEqual('[{0}]'.format(test_ipv6), salt.utils.zeromq.ip_bracket(test_ipv6))