def test_member_status(self): ''' Test for Get cluster member status ''' with patch.object(riak, '__execute_cmd', return_value={'stdout': 'A:a/B:b\nC:c/D:d'}): self.assertDictEqual(riak.member_status(), {'membership': {}, 'summary': {'A': 'a', 'C': 'c', 'B': 'b', 'D': 'd', 'Exiting': 0, 'Down': 0, 'Valid': 0, 'Leaving': 0, 'Joining': 0}})
def test_member_status(self): ''' Test for Get cluster member status ''' with patch.dict(riak.__salt__, {'cmd.run': MagicMock(return_value='A:a/B:b\nC:c/D:d')}): self.assertDictEqual(riak.member_status(), {'membership': {}, 'summary': {'A': 'a', 'C': 'c', 'B': 'b', 'D': 'd', 'Exiting': 0, 'Down': 0, 'Valid': 0, 'Leaving': 0, 'Joining': 0}})
def test_member_status(self): ''' Test for Get cluster member status ''' with patch.dict( riak.__salt__, {'cmd.run': MagicMock(return_value='A:a/B:b\nC:c/D:d')}): self.assertDictEqual( riak.member_status(), { 'membership': {}, 'summary': { 'A': 'a', 'C': 'c', 'B': 'b', 'D': 'd', 'Exiting': 0, 'Down': 0, 'Valid': 0, 'Leaving': 0, 'Joining': 0 } })
def test_member_status(self): """ Test for Get cluster member status """ with patch.object(riak, "__execute_cmd", return_value={"stdout": "A:a/B:b\nC:c/D:d"}): self.assertDictEqual( riak.member_status(), { "membership": {}, "summary": { "A": "a", "C": "c", "B": "b", "D": "d", "Exiting": 0, "Down": 0, "Valid": 0, "Leaving": 0, "Joining": 0, }, }, )