Fix open() stub in test