Example #1
0
 def test_state_detection_rules_validator(self):
     """Check that the ``state_detection_rules_validator`` function works correctly."""
     with patchers.patch_connect(True)["python"], patchers.patch_shell("")["python"]:
         # Make sure that no error is raised when the state detection rules are valid
         AndroidTVSync("HOST", 5555, state_detection_rules=STATE_DETECTION_RULES1)
         AndroidTVSync("HOST", 5555, state_detection_rules=STATE_DETECTION_RULES2)
         AndroidTVSync("HOST", 5555, state_detection_rules=STATE_DETECTION_RULES3)
         AndroidTVSync("HOST", 5555, state_detection_rules=STATE_DETECTION_RULES4)
         AndroidTVSync("HOST", 5555, state_detection_rules=STATE_DETECTION_RULES5)
Example #2
0
 def setUp(self):
     with patchers.patch_connect(True)[
             self.PATCH_KEY], patchers.patch_shell('')[self.PATCH_KEY]:
         self.atv = AndroidTVSync('HOST',
                                  5555,
                                  adb_server_ip='ADB_SERVER_IP')
         self.atv.adb_connect()
Example #3
0
 def setUp(self):
     with patchers.PATCH_ADB_DEVICE_TCP, patchers.patch_connect(True)[
             self.PATCH_KEY], patchers.patch_shell('')[self.PATCH_KEY]:
         self.atv = AndroidTVSync('HOST', 5555)
         self.atv.adb_connect()
         self.assertEqual(
             self.atv._cmd_get_properties_lazy_no_running_apps,
             constants.CMD_ANDROIDTV_PROPERTIES_LAZY_NO_RUNNING_APPS)
Example #4
0
 def setUp(self):
     with patchers.PATCH_ADB_DEVICE_TCP, patchers.patch_connect(True)[self.PATCH_KEY], patchers.patch_shell('')[self.PATCH_KEY]:
         self.atv = AndroidTVSync('HOST', 5555)
         self.atv.adb_connect()
Example #5
0
 def setUp(self):
     with patchers.patch_connect(True)[self.PATCH_KEY], patchers.patch_shell("")[self.PATCH_KEY]:
         self.atv = AndroidTVSync("HOST", 5555, adb_server_ip="ADB_SERVER_IP")
         self.atv.adb_connect()