Fix open mock in tests