<div dir="ltr">Hello.<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 9:32 PM, Dan Smith <span dir="ltr"><<a href="mailto:dms@danplanet.com" target="_blank">dms@danplanet.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">
><br>
> (self, context, [], {'migration': migration, 'image': image,<br>
> 'instance': instance, 'reservations': reservations})<br>
><br>
> while when running a test case, they see these arguments:<br>
><br>
> (self, context, [instance, image, reservations, migration,<br>
> instance_type], {})<br>
<br>
</div>All RPC-called methods get called with all of their arguments as keyword<br>
arguments. I think this explains the runtime behavior you're seeing.<br>
Tests tend to differ in this regard because test writers are human and<br>
call the methods in the way they normally expect, passing positional<br>
arguments when appropriate.<br></blockquote><div><br></div><div>It might be wise to add something like <a href="https://pypi.python.org/pypi/kwonly">https://pypi.python.org/pypi/kwonly</a> to all methods that are used in RPC and modify tests appropriately to avoid such confusion in future.</div>
</div><div><br></div>-- <br><br><div>Kind regards, Yuriy.</div>
</div></div>