mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
1e2e2b6ac5
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
22 lines
521 B
Python
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))
|