Skip to content

Investigate and add tools to mock the grpc service to write unit tests #11

@llucax

Description

@llucax

What's needed?

We need to be able to easily and reliably write unit tests for all API clients without having to spin up a server (real or mocked) for the tests.

Proposed solution

Add some utilities to mock the main grpc service, so we can somehow inject replies it should provide when some request is sent.

Use cases

No response

Alternatives and workarounds

Long term we could explore doing a more capable framework, [pytest-httpserver](https://pytest-httpserver.readthedocs.io/en/latest/ or even )like vcr (maybe it can be extended?) to record real responses from the server and then replay them in unit tests.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:testsAffects the unit, integration and performance (benchmarks) testspriority:highAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions