Fix mocked tests to return bytes like previous commit