From 728e74c921ed6a137e92c5071fd21905fabc54d4 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 16 Apr 2015 17:46:32 -0600 Subject: [PATCH] Better return data for mocked saltutil.cmd for saltmod.function --- tests/unit/states/saltmod_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/states/saltmod_test.py b/tests/unit/states/saltmod_test.py index 219a87ced7..5731ec0e31 100644 --- a/tests/unit/states/saltmod_test.py +++ b/tests/unit/states/saltmod_test.py @@ -95,7 +95,7 @@ class SaltmodTestCase(TestCase): ret.update({'comment': 'Function ran successfully.', 'result': True}) with patch.dict(saltmod.__opts__, {'test': False}): - mock = MagicMock(return_value={}) + mock = MagicMock(return_value={'minion': {'retcode': 0, 'ret': True}}) with patch.dict(saltmod.__salt__, {'saltutil.cmd': mock}): self.assertDictEqual(saltmod.function(name, tgt), ret)