[autotest] fix test_that breakage due to provisioning changes

est_that was broken by a recent change to create_job which enforces
that there are hosts actually able to run the desired job. This simple
fix just ensures that test_that's mock afe contains a host that
satisfies the newly enforced constraints.

BUG=chromium:280567
TEST=Unit tests pass; manually verified that test_that can run tests.

Change-Id: I097407c29ff8a1663da2755fab61e560a5f61c7e
Reviewed-on: https://chromium-review.googlesource.com/167319
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Alexander Miller <milleral@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/site_utils/test_that.py b/site_utils/test_that.py
index cf079b1..4c683e0 100755
--- a/site_utils/test_that.py
+++ b/site_utils/test_that.py
@@ -25,7 +25,7 @@
 from autotest_lib.client.common_lib.cros import dev_server, retry
 from autotest_lib.client.common_lib import logging_manager
 from autotest_lib.server.cros.dynamic_suite import suite
-from autotest_lib.server.cros.dynamic_suite import constants
+from autotest_lib.server.cros import provision
 from autotest_lib.server import autoserv_utils
 from autotest_lib.server import server_logging_config
 
@@ -229,9 +229,11 @@
                       'to continue without running ssh-add, but ssh commands '
                       'may fail.')
 
-    afe.create_label(constants.VERSION_PREFIX + build)
-    afe.create_label(board)
-    afe.create_host(remote)
+    build_label = afe.create_label(provision.cros_version_to_label(build))
+    board_label = afe.create_label(board)
+    new_host = afe.create_host(remote)
+    new_host.add_labels([build_label.name, board_label.name])
+
 
     # Schedule tests / suites in local afe
     for test in tests: