"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/unit/modules/test_pillar.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

test_pillar.py  (salt-2019.2.0):test_pillar.py  (salt-2019.2.1)
skipping to change at line 55 skipping to change at line 55
@skipIf(NO_MOCK, NO_MOCK_REASON) @skipIf(NO_MOCK, NO_MOCK_REASON)
def test_obfuscate(self): def test_obfuscate(self):
with patch('salt.modules.pillar.items', MagicMock(return_value=pillar_va lue_1)): with patch('salt.modules.pillar.items', MagicMock(return_value=pillar_va lue_1)):
self.assertEqual(pillarmod.obfuscate(), self.assertEqual(pillarmod.obfuscate(),
dict(a='<int>', b='<str>')) dict(a='<int>', b='<str>'))
@skipIf(NO_MOCK, NO_MOCK_REASON) @skipIf(NO_MOCK, NO_MOCK_REASON)
def test_ls(self): def test_ls(self):
with patch('salt.modules.pillar.items', MagicMock(return_value=pillar_va lue_1)): with patch('salt.modules.pillar.items', MagicMock(return_value=pillar_va lue_1)):
ls = sorted(pillarmod.ls())
if six.PY3: if six.PY3:
self.assertCountEqual(pillarmod.ls(), ['a', 'b']) self.assertCountEqual(ls, ['a', 'b'])
else: else:
self.assertEqual(pillarmod.ls(), ['a', 'b']) self.assertEqual(ls, ['a', 'b'])
@skipIf(NO_MOCK, NO_MOCK_REASON) @skipIf(NO_MOCK, NO_MOCK_REASON)
def test_pillar_get_default_merge(self): def test_pillar_get_default_merge(self):
defaults = {'int': 1, defaults = {'int': 1,
'string': 'foo', 'string': 'foo',
'list': ['foo'], 'list': ['foo'],
'dict': {'foo': 'bar', 'subkey': {'foo': 'bar'}}} 'dict': {'foo': 'bar', 'subkey': {'foo': 'bar'}}}
pillar_mock = {'int': 2, pillar_mock = {'int': 2,
'string': 'bar', 'string': 'bar',
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)