mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Add unit test for thin.gte call
This commit is contained in:
parent
69e11e0d68
commit
5026c447df
@ -13,6 +13,7 @@ from tests.support.mock import (
|
||||
|
||||
import salt.exceptions
|
||||
from salt.utils import thin
|
||||
from salt.utils import json
|
||||
import salt.utils.stringutils
|
||||
|
||||
try:
|
||||
@ -143,3 +144,13 @@ class SSHThinTestCase(TestCase):
|
||||
'tornado': '/tornado/tornado.py',
|
||||
'msgpack': 'msgpack.py'}}}
|
||||
assert cfg == thin.get_ext_tops(cfg)
|
||||
|
||||
@patch('salt.utils.thin.sys.argv', [None, '{"foo": "bar"}'])
|
||||
@patch('salt.utils.thin.get_tops', lambda **kw: kw)
|
||||
def test_gte(self):
|
||||
'''
|
||||
Test thin.gte external call for processing the info about tops per interpreter.
|
||||
|
||||
:return:
|
||||
'''
|
||||
assert json.loads(thin.gte()).get('foo') == 'bar'
|
||||
|
Loading…
Reference in New Issue
Block a user