Hello,<div><br></div><div>I've been working on implementing the "diagnostics" command for libvirt - <a href="https://review.openstack.org/#/c/8839/" target="_blank">https://review.openstack.org/#/c/8839/</a> . Now i need to create the unit test for this new operation. I've been looking at the code to try and figure out an easy way to replicate this, but i'm a bit lost. </div>
<div><br></div><div>What i need to do is simulate a connection to libvirt, create a fake instance with a predefined characteristics, retrieve the virtdomain and then verify the results from the get_diagnostics command. I'm more at loss as to how exactly do i setup a fake connection a create a fake instance? I thought about creating a dummy implementation as i've seen being used around the tests, however that doesn't give me any access to real method. Do note that I'm relatively new to python world, so there's a lot of things i can't grasp yes :s.</div>
<div><br></div><div><br></div><div>Regards,</div><div>Leander</div>