get_efd_client

lsst.ts.scheduler.utils.get_efd_client(efd_name: str, mock: bool = False) Any

Utility function to get an EFD client.

This method helps deal with the condition where library cannot be imported and a mock client is needed for unit testing.

Parameters:
efd_namestr

Name of the EFD instance.

mockbool

Create a mock EFD client instead of creating a real instance.

Returns:
efd_clientlsst_efd_client.EfdClient or unittest.mock.AsyncMock

EFD client.

Raises:
RuntimeError:

If efd_name is not valid.