Mock headless in tests