I would like to add that I did not implement the test method, it was already there. Also it supplies a different set of data than the one i received when working with devstack.<div><br></div><div>Which of the data types should i assume to be correct, the one from devstack or the one from the test?<br>
<br><div class="gmail_quote">On Mon, Jun 25, 2012 at 4:10 PM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You are not returning the data in the test method, whereas you are in the real method :)<br>
<br>
-jay<div class="im"><br>
<br>
On 06/25/2012 10:44 AM, Leander Bessa Beernaert wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Sorry, forgot to add the code:<br>
<br></div>
*This is my method (this worked with devstack):*<div class="im"><br>
     def get_diagnostics(self, instance):<br>
         dom = self._lookup_by_name(instance[<u></u>'name'])<br>
         return diagnostics.get_diagnostics(<u></u>dom)<br>
<br>
<br></div>
*and this the test method*:<div class="im"><br>
<br>
  def test_get_diagnostics(self):<br>
         instance_ref, network_info = self._get_running_instance()<br>
         self.connection.get_<u></u>diagnostics(instance_ref['<u></u>name'])<br>
<br>
On Mon, Jun 25, 2012 at 3:41 PM, Leander Bessa Beernaert<br></div><div class="im">
<<a href="mailto:leanderbb@gmail.com" target="_blank">leanderbb@gmail.com</a> <mailto:<a href="mailto:leanderbb@gmail.com" target="_blank">leanderbb@gmail.com</a>>> wrote:<br>
<br>
    Hello,<br>
<br>
    I'm working on the diagnostics method for libvirt. I've<br>
    successfully managed to test it while running it manually and with<br>
    devstack. However, the test case in test_virt_drivers.py fails since<br>
    it supplies a different data type to the method.<br>
<br>
    Could it be possible that there's a certain mismatch between the two<br>
    or that this particular method accepts multiple sorts of data-types?<br>
<br>
    Regards,<br>
    Leander<br>
<br>
<br>
<br>
<br></div>
______________________________<u></u>_________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/<u></u>ListHelp</a><br>
<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/<u></u>ListHelp</a><br>
</blockquote></div><br></div>