Make API tests run via tox

This patch makes the changes necessary to make the API tests
run via tox.

Change-Id: I44fe0ee301b7427c01e3eb44975bf068f398338e
Merge "Make API tests run via tox"