def test_cluster_commit(self): ''' Test for Commit Cluster Changes ''' with patch.dict(riak.__salt__, {'cmd.retcode': MagicMock(return_value=False)}): self.assertTrue(riak.cluster_commit())
def test_cluster_commit(self): ''' Test for Commit Cluster Changes ''' with patch.object(riak, '__execute_cmd', return_value={'retcode': 0, 'stdout': 'success'}): self.assertEqual( riak.cluster_commit(), {'success': True, 'comment': 'success'} )
def test_cluster_commit(self): """ Test for Commit Cluster Changes """ with patch.object( riak, "__execute_cmd", return_value={"retcode": 0, "stdout": "success"} ): self.assertEqual( riak.cluster_commit(), {"success": True, "comment": "success"} )