mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Fixed some tests... maybe...
This commit is contained in:
parent
ff7296d983
commit
b473fb7827
@ -46,8 +46,8 @@ class RegTestCase(TestCase):
|
||||
|
||||
mock = MagicMock(side_effect=[value, 'a', 'a'])
|
||||
mock_t = MagicMock(return_value=True)
|
||||
with patch.dict(reg.__salt__, {'reg.read_key': mock,
|
||||
'reg.set_key': mock_t}):
|
||||
with patch.dict(reg.__salt__, {'reg.read_value': mock,
|
||||
'reg.set_value': mock_t}):
|
||||
self.assertDictEqual(reg.present(name, value), ret)
|
||||
|
||||
with patch.dict(reg.__opts__, {'test': True}):
|
||||
@ -74,8 +74,8 @@ class RegTestCase(TestCase):
|
||||
|
||||
mock = MagicMock(side_effect=[False, True, True])
|
||||
mock_t = MagicMock(return_value=True)
|
||||
with patch.dict(reg.__salt__, {'reg.read_key': mock,
|
||||
'reg.delete_key': mock_t}):
|
||||
with patch.dict(reg.__salt__, {'reg.read_value': mock,
|
||||
'reg.delete_value': mock_t}):
|
||||
self.assertDictEqual(reg.absent(name), ret)
|
||||
|
||||
with patch.dict(reg.__opts__, {'test': True}):
|
||||
|
Loading…
Reference in New Issue
Block a user