[Twisted-Python] Testing AMP-based code
free at 64studio.com
Wed Jun 5 13:13:02 MDT 2013
following up from ticket #6502, I'm looking for recommendations/best
practices for writing unit-tests for AMP-based code.
As described in the ticket, the issue I'm currently facing is that the
AMP implementation is subtly not re-entrant safe and doesn't work with a
synchronous transport, for example this code raises an exception:
I'm starting to think that the most appropriate testing strategy would
be to mock/stub AMP.callRemote (or the protocol class altogether)
instead of trying to use a fake transport.
More information about the Twisted-Python