finish test_host.py, fix bugs in host.py

Change-Id: Iebbeb3f59cb0de9b00c770005cf9c1158ad204c6