mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #47985 from twangboy/fix_test_reg
Fix `unit.states.test_reg` test failure
This commit is contained in:
commit
1b4c72345b
@ -48,8 +48,10 @@ class RegTestCase(TestCase, LoaderModuleMockMixin):
|
||||
{'vdata': 'a', 'success': True},
|
||||
{'vdata': 'a', 'success': True}])
|
||||
mock_t = MagicMock(return_value=True)
|
||||
mock_cast = MagicMock(return_value=vdata)
|
||||
with patch.dict(reg.__utils__, {'reg.read_value': mock_read,
|
||||
'reg.set_value': mock_t}):
|
||||
'reg.set_value': mock_t,
|
||||
'reg.cast_vdata': mock_cast}):
|
||||
self.assertDictEqual(reg.present(name,
|
||||
vname=vname,
|
||||
vdata=vdata), ret)
|
||||
|
Loading…
Reference in New Issue
Block a user