tests: fix unit test which adds ports in various daring ways.

Signed-off-by: Peter Soetens <peter@thesourceworks.com>