port numbering bug fix

fixes #312 
If correct ports becomes False, then we will break prematurely and exit the test before the example completes.

This will mean that port 6633 is bound in the next test, causing an incorrect failure.

To fix the problem, promote the assertTrue to the same indentation level as the while loop.