1
0
Эх сурвалжийг харах

Drop Py2 and six on tests/unit/transport/test_zeromq.py

Pedro Algarvio 3 жил өмнө
parent
commit
57dda7eec8

+ 5 - 3
tests/unit/transport/test_zeromq.py

@@ -18,9 +18,8 @@ import salt.transport.client
 import salt.transport.server
 import salt.utils.platform
 import salt.utils.process
+import salt.utils.stringutils
 import zmq.eventloop.ioloop
-from salt.ext import six
-from salt.ext.six.moves import range
 from salt.ext.tornado.testing import AsyncTestCase
 from salt.transport.zeromq import AsyncReqMessageClientPool
 from saltfactories.utils.ports import get_unused_localhost_port
@@ -435,7 +434,10 @@ class PubServerChannel(TestCase, AdaptedConfigurationTestCaseMixin):
         )
         salt.master.SMaster.secrets["aes"] = {
             "secret": multiprocessing.Array(
-                ctypes.c_char, six.b(salt.crypt.Crypticle.generate_key_string()),
+                ctypes.c_char,
+                salt.utils.stringutils.to_bytes(
+                    salt.crypt.Crypticle.generate_key_string()
+                ),
             ),
         }
         cls.minion_config = cls.get_temp_config(