async def METHOD_NAME(self):
    if not self.responses:
        await asyncio.sleep(1)  # delay to give test time to finish
        raise ConnectionClosed(0, 'ran out of responses')
    return json.dumps(self.responses.popleft())