factory: fix unit tests

Fix some unit tests in src/platform/factory.
Not fixed:
  py/dkps/dkps_unittest.py
    This test takes 850 seconds, but `make test` only waits for 300s.
  py/umpire/service/overlord_unittest.py
    You need to `sudo emerge chromeos-factory-overlord` first.

BUG=chromium:555350
TEST=make test # py/dkps/dkps_unittest.py won't pass

Change-Id: I9356b24a3eb4339622aaf606011bac31d2c97c04
Reviewed-on: https://chromium-review.googlesource.com/312178
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
6 files changed