Add a unit test for the routine that makes the port part of a URL. The test
lifts the routine out of the module source, because the module needs a
database to load.
The test shows that the default port gives no text, that another port gives
a colon and the port, and that a port that is not set gives no text. It also
shows that the four places that write a URL read the port through the
routine.