IqmServerMockBase#
- class IqmServerMockBase#
Bases:
QuantumComputersServicer
,CalibrationsServicer
,JobsServicer
Base class for IQM server mocks. Only meant for testing IQM library packages, do not use outside of tests!
Module:
iqm.station_control.client.iqm_server.testing.iqm_server_mock
Methods
Gets a grpc.Channel that connects to this mock server instance.
A utility function for converting a binary data blob into a`(stream DataChunk)`.
Helper function for generating protobuf UUIDs
Helper function for generating protobuf timestamps
Helper function for generating protobuf UUIDs
- static proto_uuid(base=None)#
Helper function for generating protobuf UUIDs
- Parameters:
base (UUID | None) –
- Return type:
Uuid
- static parse_uuid(value)#
Helper function for generating protobuf UUIDs
- Parameters:
value (Uuid) –
- Return type:
- static proto_timestamp(base=None)#
Helper function for generating protobuf timestamps
- Parameters:
base (datetime | None) –
- Return type:
Timestamp
- channel()#
Gets a grpc.Channel that connects to this mock server instance. Can be used to initialize a new IqmServerClient that uses this mock server instance as a backend for the invoked GRPC calls.
- Return type:
Channel