def test_full_info(self): ''' Test to return the node_info, vm_info and freemem ''' mock = MagicMock(return_value="salt") with patch.object(xapi, "node_info", mock): mock = MagicMock(return_value="stack") with patch.object(xapi, "vm_info", mock): self.assertDictEqual(xapi.full_info(), {'node_info': 'salt', 'vm_info': 'stack'})