mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Add unit test for get_supported_py_config function base tops
This commit is contained in:
parent
a284d73e1f
commit
96d83dac63
@ -580,3 +580,16 @@ class SSHThinTestCase(TestCase):
|
||||
ext_cfg = {}
|
||||
out = thin._get_supported_py_config(tops=tops, extended_cfg=ext_cfg)
|
||||
assert type(salt.utils.stringutils.to_bytes('')) == type(out)
|
||||
|
||||
def test_get_supported_py_config_base_tops(self):
|
||||
'''
|
||||
Test collecting proper py-versions. Should return proper base tops.
|
||||
:return:
|
||||
'''
|
||||
tops = {'3': ['/groundkeepers', '/stole'], '2': ['/the-root', '/password']}
|
||||
ext_cfg = {}
|
||||
out = salt.utils.stringutils.to_str(thin._get_supported_py_config(
|
||||
tops=tops, extended_cfg=ext_cfg)).strip().split('\n')
|
||||
assert len(out) == 2
|
||||
for t_line in ['py3:3:0', 'py2:2:7']:
|
||||
assert t_line in out
|
||||
|
Loading…
Reference in New Issue
Block a user