mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix gen_thin exception on Python 3
This commit is contained in:
parent
c594d4021d
commit
26af4380fd
@ -335,7 +335,7 @@ class SSHThinTestCase(TestCase):
|
||||
assert path == '/path/to/thin/min.tgz'
|
||||
assert form == 'sha256'
|
||||
|
||||
@patch('salt.utils.thin.sys.version_info', MagicMock(return_value=(2, 5)))
|
||||
@patch('salt.utils.thin.sys.version_info', (2, 5))
|
||||
@patch('salt.exceptions.SaltSystemExit', Exception)
|
||||
def test_gen_thin_fails_ancient_python_version(self):
|
||||
'''
|
||||
@ -345,6 +345,7 @@ class SSHThinTestCase(TestCase):
|
||||
:return:
|
||||
'''
|
||||
with pytest.raises(salt.exceptions.SaltSystemExit) as err:
|
||||
thin.sys.exc_clear = lambda: None
|
||||
thin.gen_thin('')
|
||||
assert 'The minimum required python version to run salt-ssh is "2.6"' in str(err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user