Skip to content

Idea for test suite #9

@evvaaaa

Description

@evvaaaa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions