api/revision: Fix /revision/directory endpoint and improve tests
That endpoint was currently returning an error 500 as some breaking changes
were missed due to the use of mocking in tests.
So fix the issue and ensure asociated tests do not use any mocks anymore.