DeviceProxy cannot use device name when in MultiDeviceTestContext

When using a tango.test_context.MultiDeviceTestContext, tango.DeviceProxy cannot be called with the device name:

device = tango.DeviceProxy("low/elt/subarray_1")

Instead it must be called with a Tango resource locator:

device = tango.DeviceProxy("tango://172.17.0.3:48493/low/elt/subarray_1#dbase=no")

This is a quite a problem because the production code under test will typically contain device interactions in which one device creates a proxy to another using the device name.

Thus, in order to test using a tango.test_context.MultiDeviceTestContext, we either have to monkey-patch tango.DeviceProxy (but this monkey-patching is difficult to get right, and fragile, and also, monkey-patching sucks) or we have to write all our production code to proxy through a MyDeviceProxy object that allows us to inject a patch whenever we use tango.test_context.MultiDeviceTestContext. Neither workaround is very nice.

(This is a long-known problem for which an issue has never been raised

I am raising this issue now, to keep it on the agenda, and so that I can link to it in my documentation.)

Edited by Drew Devereux