mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
[PY3] bytes for events_test
This commit is contained in:
parent
5e26d2e47e
commit
f5b1769e0b
@ -30,7 +30,7 @@ ensure_in_syspath('../../')
|
|||||||
# Import salt libs
|
# Import salt libs
|
||||||
import integration
|
import integration
|
||||||
from salt.utils.process import clean_proc
|
from salt.utils.process import clean_proc
|
||||||
from salt.utils import event
|
from salt.utils import event, to_bytes
|
||||||
|
|
||||||
# Import 3rd-+arty libs
|
# Import 3rd-+arty libs
|
||||||
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
||||||
@ -116,7 +116,7 @@ class TestSaltEvent(TestCase):
|
|||||||
|
|
||||||
def test_minion_event(self):
|
def test_minion_event(self):
|
||||||
opts = dict(id='foo', sock_dir=SOCK_DIR)
|
opts = dict(id='foo', sock_dir=SOCK_DIR)
|
||||||
id_hash = hashlib.md5(opts['id']).hexdigest()[:10]
|
id_hash = hashlib.md5(to_bytes(opts['id'])).hexdigest()[:10]
|
||||||
me = event.MinionEvent(opts, listen=False)
|
me = event.MinionEvent(opts, listen=False)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
me.puburi,
|
me.puburi,
|
||||||
@ -143,7 +143,7 @@ class TestSaltEvent(TestCase):
|
|||||||
|
|
||||||
def test_minion_event_no_id(self):
|
def test_minion_event_no_id(self):
|
||||||
me = event.MinionEvent(dict(sock_dir=SOCK_DIR), listen=False)
|
me = event.MinionEvent(dict(sock_dir=SOCK_DIR), listen=False)
|
||||||
id_hash = hashlib.md5('').hexdigest()[:10]
|
id_hash = hashlib.md5(to_bytes('')).hexdigest()[:10]
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
me.puburi,
|
me.puburi,
|
||||||
'{0}'.format(
|
'{0}'.format(
|
||||||
|
Loading…
Reference in New Issue
Block a user