tests: Mock out subprocess