def setUp(self): """ """ if hasattr(self, 'leader'): self._setup_dut(self.leader) self.leader.tal_http.power_state_standby_standby() if hasattr(self, 'follower'): self._setup_dut(self.follower) self.follower.tal_http.power_state_standby_standby() else: self.nav_ltap.target.set_IR_telegram_format_F17( IRTRANS.IRAddress.IRA1, IRTRANS.NetworkBit.local, IRTRANS.AudioVideo.audio) self._verification = ASEHelpers.Verification( self.logger, self.tal_http, self.assertFalse, self.assertEqual) ASEHelpers.check_tunein_url(self.tal, self.tal_http, self.selenium_server, self.chromecast, self.skipTest) self._tunein_account = comm_const.TUNEIN_ACCOUNT self._tunein_client = ASEHelpers.TuneInClientHelper( self.tal_http, self.logger, self._tunein_account, self.skipTest, self.tal) Helpers.clear_queue(self.tal_http) self.tal_http.set_active_source(comm_const.SourceJidPrefix.RADIO) self.product_fiendly_name = self.tal_http.get_product_friendly_name( ) if self.apple_communicator is not None: self.apple_communicator.ip_address = self.tal.get_ip() self.apple_communicator.create_client(60) self.logger.info("Setup end")
def setUp(self): """ """ if hasattr(self, 'leader'): self._setup_dut(self.leader) self.leader.tal_http.power_state_standby_standby() if hasattr(self, 'follower'): self._setup_dut(self.follower) self.follower.tal_http.power_state_standby_standby() else: self.nav_ltap.target.set_IR_telegram_format_F17(IRTRANS.IRAddress.IRA1, IRTRANS.NetworkBit.local, IRTRANS.AudioVideo.audio) self._verification = ASEHelpers.Verification(self.logger, self.tal_http, self.assertFalse, self.assertEqual) ASEHelpers.check_tunein_url(self.tal, self.tal_http, self.selenium_server, self.chromecast, self.skipTest) self._tunein_account = comm_const.TUNEIN_ACCOUNT self._tunein_client = ASEHelpers.TuneInClientHelper(self.tal_http, self.logger, self._tunein_account, self.skipTest, self.tal) Helpers.clear_queue(self.tal_http) self.tal_http.set_active_source(comm_const.SourceJidPrefix.RADIO) self.product_fiendly_name = self.tal_http.get_product_friendly_name() if self.apple_communicator is not None: self.apple_communicator.ip_address = self.tal.get_ip() self.apple_communicator.create_client(60) self.logger.info("Setup end")
def _play_deezer(self): """ Clears music playqueue and adds two deezer tracks of wich the first will start to play """ Helpers.clear_queue(self.tal_http, Helpers.PlayQueueName.MUSIC) # clear MUSIC queue current_sources = self.tal_http.get_active_sources(True) self.tal.logger.info("current sources: %s" % current_sources) self.tal_http.send_http_command_delete(comm_const.BEOZONE_PLAYQUEUE) self.tal_http.logger.info("***clear queue finish***") self.tal_http.set_active_source(comm_const.SourceJidPrefix.DEEZER) play_ids = self._deezer_client_helper.add_tracks_to_play_queue(5) self.tal_http.play_queue_play(play_ids[0]) time.sleep(5)
def _setup_dut(self, product): """ product setup @param product: Leader/Follower ex self.leader or self.follower @type product: String """ product.nav_ltap.target.set_IR_telegram_format_F17( IRTRANS.IRAddress.IRA1, IRTRANS.NetworkBit.local, IRTRANS.AudioVideo.audio) product._deezer_client = ASEHelpers.DeezerClientHelper( product.tal_http, self.logger, ASEHelpers.get_deezer_account(self.tal)) product.tal_http.set_active_source(comm_const.SourceJidPrefix.RADIO) Helpers.clear_queue(product.tal_http) product.sound_verification = ASEHelpers.SoundVerification( self.logger, product.sound_card, product.tal_http, self.assertFalse, self.assertEqual, 50)
def _setup_dut(self, product): """ product setup @param product: Leader/Follower ex self.leader or self.follower @type product: String """ product.nav_ltap.target.set_IR_telegram_format_F17(IRTRANS.IRAddress.IRA1, IRTRANS.NetworkBit.local, IRTRANS.AudioVideo.audio) product._deezer_client = ASEHelpers.DeezerClientHelper(product.tal_http, self.logger, ASEHelpers.get_deezer_account(self.tal)) product.tal_http.set_active_source(comm_const.SourceJidPrefix.RADIO) Helpers.clear_queue(product.tal_http) product.sound_verification = ASEHelpers.SoundVerification(self.logger, product.sound_card, product.tal_http, self.assertFalse, self.assertEqual, 50)