Bluetooth: implement first two Sanity checks

Check that the DUT has a Bluetooth adapter, and check that the Bluetooth
adapter address is not garbage.

BUG=chromium:256771
TEST=run_remote_tests

Change-Id: I0b87bf25ea103591c8eab2884e519a32c82f6c72
Reviewed-on: https://gerrit.chromium.org/gerrit/64003
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
diff --git a/server/cros/bluetooth/bluetooth_tester.py b/server/cros/bluetooth/bluetooth_tester.py
index 3ad9d0c..861a6f8 100644
--- a/server/cros/bluetooth/bluetooth_tester.py
+++ b/server/cros/bluetooth/bluetooth_tester.py
@@ -3,7 +3,7 @@
 # found in the LICENSE file.
 
 from autotest_lib.client.cros import constants
-from autotest_lib.server import autotest
+from autotest_lib.server import autotest, hosts
 
 
 class BluetoothTester(object):
@@ -43,3 +43,23 @@
         """Tear down state associated with the client."""
         # This kills the RPC server.
         self.host.close()
+
+
+def create_host_from(client_host):
+    """Creates a host object for the Tester associated with a DUT.
+
+    Will raise an exception if there isn't a tester for the DUT.
+
+    @param client_host: Autotest host object for the DUT.
+
+    @return Autotest host object for the Tester.
+
+    """
+
+    client_hostname = client_host.hostname
+
+    parts = client_hostname.split('.')
+    parts[0] = parts[0] + '-bluetooth'
+    tester_hostname = '.'.join(parts)
+
+    return hosts.create_host(tester_hostname)