diff --git a/tests/unit/utils/test_pycrypto.py b/tests/unit/utils/test_pycrypto.py index c4f3cfb2e0fa..dfc34f5ea91a 100644 --- a/tests/unit/utils/test_pycrypto.py +++ b/tests/unit/utils/test_pycrypto.py @@ -26,14 +26,17 @@ def test_gen_hash(self): Test gen_hash ''' passwd = 'test_password' + id = '$' + if salt.utils.platform.is_darwin(): + id = '' ret = salt.utils.pycrypto.gen_hash(password=passwd) - self.assertTrue(ret.startswith('$6$')) + self.assertTrue(ret.startswith('$6{0}'.format(id))) ret = salt.utils.pycrypto.gen_hash(password=passwd, algorithm='md5') - self.assertTrue(ret.startswith('$1$')) + self.assertTrue(ret.startswith('$1{0}'.format(id))) ret = salt.utils.pycrypto.gen_hash(password=passwd, algorithm='sha256') - self.assertTrue(ret.startswith('$5$')) + self.assertTrue(ret.startswith('$5{0}'.format(id))) def test_secure_password(self): '''