def test_cluster_join(self): ''' Test for Join a Riak cluster ''' self.assertFalse(riak.cluster_join()) with patch.dict(riak.__salt__, {'cmd.retcode': MagicMock(return_value=False)}): self.assertTrue(riak.cluster_join('A', 'B'))
def test_cluster_join(self): ''' Test for Join a Riak cluster ''' with patch.object(riak, '__execute_cmd', return_value={'retcode': 0, 'stdout': 'success'}): self.assertEqual( riak.cluster_join('A', 'B'), {'success': True, 'comment': 'success'} )
def test_cluster_join(self): """ Test for Join a Riak cluster """ with patch.object( riak, "__execute_cmd", return_value={"retcode": 0, "stdout": "success"} ): self.assertEqual( riak.cluster_join("A", "B"), {"success": True, "comment": "success"} )