Esempio n. 1
0
def test_succeed_without_changes():
    """
    Test to returns successful.
    """
    ret = {"name": "salt", "changes": {}, "result": True, "comment": ""}
    with patch.dict(test.__opts__, {"test": False}):
        ret.update({"comment": "Success!"})
        assert test.succeed_without_changes("salt") == ret

    with patch.dict(test.__opts__, {"test": False}):
        ret.update({"comment": "A success comment!"})
        assert test.succeed_without_changes(
            "salt", comment="A success comment!") == ret
Esempio n. 2
0
 def test_succeed_without_changes(self):
     '''
         Test to returns successful.
     '''
     ret = {'name': 'salt', 'changes': {}, 'result': True, 'comment': ''}
     with patch.dict(test.__opts__, {"test": False}):
         ret.update({'comment': 'Success!'})
         self.assertDictEqual(test.succeed_without_changes('salt'), ret)
Esempio n. 3
0
 def test_succeed_without_changes(self):
     """
         Test to returns successful.
     """
     ret = {"name": "salt", "changes": {}, "result": True, "comment": ""}
     with patch.dict(test.__opts__, {"test": False}):
         ret.update({"comment": "Success!"})
         self.assertDictEqual(test.succeed_without_changes("salt"), ret)
Esempio n. 4
0
 def test_succeed_without_changes(self):
     '''
         Test to returns successful.
     '''
     ret = {'name': 'salt',
            'changes': {},
            'result': True,
            'comment': ''}
     with patch.dict(test.__opts__, {"test": False}):
         ret.update({'comment': 'Success!'})
         self.assertDictEqual(test.succeed_without_changes('salt'), ret)