Refactor test.py to be easier to fake.

Moved some of the data returned by TestPort into public instance
variables that can be replaced for testing.

BUG=595414

Review-Url: https://codereview.chromium.org/2121823003
Cr-Commit-Position: refs/heads/master@{#404212}
1 file changed