Closed MariusGailius closed 3 months ago
To clarify - I need to mock only one method, others should behave the same.
Ended up making a custom proxy object that passes function calls to pyro and mocks what I need. Not elegant, but works.
Yeah you probably chose the easiest workaround.
Attributes on Pyro proxy objects are intercepted because they need to set/retrieve the value on the remote object.
I am trying to mock exposed method and get:
remote object 'PYRO:TestClass@127.0.0.1:60000' has no exposed attribute 'method_i_would_like_to_mock'
. Is there anyway around this? Assuming this happens because of Pyro5 magic. I only need to mock one of the exposed methods while preserving other methods. Sample server:Sample client:
Using python 3.12.1.
Thanks, Marius