Fix mocks used by mocha tests