[python-win32] python wmi testing question

Chiradeep Vittal chiradeepv at gmail.com
Thu Jan 6 01:38:05 CET 2011


My module is using the WMI module to use WMI Hyper-V provider.
My module obeys a public contract that needs to be exercised by the build
automation framework. The build machine is not running on Windows.
How could I easily mock the calls to WMI (and the subsequent calls to WMI
objects returned by the calls the wmi.MsVmFoo()) ?
It seems that using Mock (or similar) will fail since these WMI objects
themselves have some getattr magic going on behind the scenes?

Thanks
--
CV
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110105/a0db1100/attachment-0001.html>


More information about the python-win32 mailing list