<div dir="ltr"><div><div><div><div>Hi!<br><br></div>I'm trying to write code using TDD and AMP. I'm trying to figure out how to write a unit test for:<br><br></div>@MyCommand.responder<br><br></div>Specifically, I would assume that test:<br>

<br></div>1. Tests that the responder locator has a responder for MyCommand;<br><div>2. That responder matches the decorated method<br></div><div><div><div><div><div><br></div><div>(1) is easy, (2) not so much. Since usually the responder locator gives me this nasty "doit" function that isn't introspectable (unless it.func_closure[0].cell_contents.im_func counts as "introspection"), I'm not sure how to write that unit test.<br>

<br></div><div>I do have end-to-end tests for this, obviously: I would like to also have regular tests :)<br></div><div><br></div><div>thanks in advance<br>lvh<br></div></div></div></div></div></div>