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