示例#1
0
async def dc_session(request, hardware, monkeypatch, loop):
    """
    Mock session manager for deck calibation
    """
    await hardware.cache_instruments({types.Mount.RIGHT: 'p300_multi'})
    ses = endpoints.SessionManager(hardware)
    endpoints.session_wrapper.session = ses
    yield ses
    endpoints.session_wrapper.session = None
示例#2
0
async def dc_session(request, async_server, monkeypatch, loop):
    """
    Mock session manager for deck calibation
    """
    hw = async_server['com.opentrons.hardware']
    await hw.cache_instruments({
        types.Mount.LEFT: None,
        types.Mount.RIGHT: 'p300_multi_v1'})
    ses = endpoints.SessionManager(hw)
    endpoints.session = ses
    monkeypatch.setattr(endpoints, 'session', ses)
    yield ses