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