Hi all (and thanks for the pizza! =),<div><br></div><div>I&#39;d like to set up a test suite for an embedded J2ME application. Most of the code is cleanly separated from the platform since it runs on multiple platforms, and I wanted to use Jython to replace the platform-specific parts and run both unit and scenario testing on the common parts. </div>
<div><br></div><div>However, naive replacement of the class definitions does not seem to work, and trying to use mock to patch a java class like this:</div><div><br></div><div>with mock.patch(&#39;my.device.DeviceHandler&#39;) as devicehandler:</div>
<div><br></div><div>i get:</div><div><br></div><div>AttributeError: &#39;javapackage&#39; object has no attribute &#39;DeviceHandler&#39;</div><div>    </div><div>Is it possible to get the behavior I want?</div><div><br>-- <br>
/f<br><br>I reject your reality and substitute my own.<div><span style="font-family:anivers-1, anivers-2, sans-serif;color:rgb(216, 118, 0)"><a href="http://courteous.ly/yp3Zgd" style="color:inherit;text-decoration:underline" target="_blank">http://courteous.ly/yp3Zgd</a></span></div>
<br>
</div>