In pandablocks-ioc we have a mock asyncio client which sends responses, including those of GetChanges. For example....
This ended up being pretty nasty, we're using the same responses for a bunch of unrelated tests.
With the new system we should be able to add responses directly from the test. For example
async def test_blah(mocked_panda):
async def some_test_conditions():
mocked_panda.add_command(...)
mocked_panda.add_response(...)
assert ctxt.put("PV_PREFIX:BLAH")
...
# Set up `transport`
asyncio.gather(transport.run(), some_test_conditions())
The mocked_panda will by default respond with no changes unless you add the response yourself.
In pandablocks-ioc we have a mock asyncio client which sends responses, including those of
GetChanges. For example....This ended up being pretty nasty, we're using the same responses for a bunch of unrelated tests.
With the new system we should be able to add responses directly from the test. For example
The mocked_panda will by default respond with no changes unless you add the response yourself.