Test: path is trimmed when returned by the API (#9824)
This commit contains the test that was missing for my other PR:
https://github.com/readthedocs/readthedocs.org/pull/9815
The test checks the commands' PATH are trimmed before being returned by the API.