Add missing tests for ports API

There was missing API tests in test_ports.

Change-Id: I1b71d1d95bd8546b6d8b03b9db87b2979edb3049
Merge "Add missing tests for ports API"