Code review comment for lp:~allenap/maas/api-uri-bug-1059645

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The comment “Make all API URLs absolute” in api.py seems a bit terse. Please leave a note so that some future visitor knows not to let this regress.

In test_handler_uris_are_absolute you make conditional assertions inside nested loops. That has its drawbacks: a failure stops the entire test, and you're not verifying that you're actually exercising the assertions. Better to gather your results and your expectations, and verify equality in one go.

Finally, in test_apidoc.py, why does the URL lack protocol and hostname?

Jeroen

review: Approve

« Back to merge proposal