示例#1
0
 def test_offline_data_sync_corrected(self):
     url_single = get_config_value("garage", "url_single")
     download_file_path = os.path.join(self.garage.download_folder,
                                       os.path.basename(url_single))
     md5sum_conf = get_config_value("garage", "md5sum")
     url_single = "http://" + self.serverip + url_single
     self.check_download_task_in_garage_mode(url_single, 120)
     md5sum = self.garage.get_md5sum(download_file_path)
     assert md5sum_conf == md5sum, "Download file error"
示例#2
0
 def test_enter_garage_mode_parked_for_one_night(self):
     url_single = get_config_value("garage", "url_single")
     url_single = "http://" + self.serverip + url_single
     sleep_time = 12 * 3600
     seconds = 24 * 3600 + 300 - sleep_time
     h = seconds / 3600
     m = (seconds % 3600) / 60
     time_to_set = "%02d:%02d" % (h, m)
     self.check_download_task_in_garage_mode(url_single, sleep_time,
                                             time_to_set)
示例#3
0
 def test_power_off_downloadingfrombrowser(self):
     from testlib.em.apps import EMToolsDownload
     from testlib.em.tools import get_server_ip, get_config_value
     from testlib.em.settings import WifiSetting
     url = "http://" + get_server_ip() + get_config_value(
         "webpage", "big_file")
     # connect wifi
     wifi = WifiSetting()
     wifi.connect_wifi_by_conf("wifi_adb")
     em = EMToolsDownload()
     em.install()
     em.grant_permissions()
     em.download_file(url)
     time.sleep(5)
     assert em.get_download_file_status()
     self.common_reboot()
示例#4
0
 def setUp(self):
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self.s0ix = get_s0ix_obj()
     self.s0ix.adb_root()
     self.url = "http://" + get_server_ip() + get_config_value(
         "webpage", "big_file")
     self.emtools = EMToolsDownload()
     self.emtools.install()
     self.emtools.grant_permissions()
     self.emtools.clean_download_folder()
     self.display = DisplaySetting()
     self.display.set_screen_status("on")
     self.display.unlock_screen()
     self.display.set_sleep_mode("30 minutes")
     self.connect_wifi()
     super(S0i3httpDownload, self).setUp()
示例#5
0
 def test_webpage_enter_s0i3(self):
     url = "http://" + get_server_ip() + get_config_value(
         "webpage", "simple_page")
     self.check_s0i3_browser(url)
示例#6
0
 def test_html5_enter_s0i3(self):
     url = "http://" + get_server_ip() + get_config_value(
         "webpage", "html5demos")
     self.check_s0i3_browser(url)
示例#7
0
 def test_video_streaming_enter_s0i3(self):
     url = "http://" + get_server_ip() + get_config_value(
         "webpage", "video_play")
     self.check_s0i3_browser(url, "video")
示例#8
0
 def test_enter_garage_mode_downloaded_batch_files(self):
     url_batch = get_config_value("garage", "url_batch")
     url_batch = "http://" + self.serverip + url_batch
     self.check_download_task_in_garage_mode(url_batch, 200)
示例#9
0
 def test_enter_garage_mode_parked_for_more_than_3_minutes(self):
     url_single = get_config_value("garage", "url_single")
     url_single = "http://" + self.serverip + url_single
     self.check_download_task_in_garage_mode(url_single, 120)