def setUp(self):
        print "[Setup]:%s" % self.__class__.__name__
        super(ImageViewing, self).setUp()
        self.device = g_common_obj.get_device()
        self.photos = get_photo_implement()
        self.qrcodeImpl = QRcode()
        self.wallpaper = WallpaperImpl()

        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()

        self.qrcode = "GIFPICTURE"
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat/', 'sys.conf')

        cfg = config.read(cfg_file, 'qrcode_marked_image')
        self.qrcode = cfg.get("screenshot_imageview_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("screenshot_imageview_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.photos.refresh_sdcard()
Пример #2
0
 def setUp(self):
     super(Fit, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._fit = FitImpl()
     self._fit.set_password_lock()
     self.wallpaper = WallpaperImpl()
 def setUp(self):
     super(SetLiveWallpaperSuspendResume, self).setUp()
     self._test_name = __name__
     self._device = g_common_obj.get_device()
     print "[Setup]: %s" % self._test_name
     self._composeui = ComposeUiImpl()
     self._liveWallpaper = WallpaperImpl()
     #         self._liveWallpaper.reset_wallpaper()
     config_handle = ConfigHandle()
     result = config_handle.check_apps("com.android.galaxy4")
     if result == 0:
         self._composeui.install_apk('Galaxy4')
    def setUp(self):
        print "[Setup]:%s" % self.__class__.__name__
        super(WallpaperSetGIFImageTest, self).setUp()

        self.photos = PhotosExtendImpl()
        self.camera = CameraExtendImpl()
        self.systemui = SystemUiExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
        self.wallpaper = WallpaperImpl()

        self.systemui.unlock_screen()
        self.d.screen.on()
        self.d.press.menu()

        self.photos.clean()
        self.camera.clean()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        self.wallpaper.reset_wallpaper()

        self.qrcode = "GIFPICTURE"
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat/', 'sys.conf')

        cfg = config.read(cfg_file, 'qrcode_marked_image')
        arti = Artifactory(cfg_arti.get('location'))
        self.qrcode = cfg.get("imageviewing_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        pic_name = cfg.get("imageviewing_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        ImageDetails.set_workaround()

        self.photos.setup()

        self.mark_time = logcat.get_device_time_mark()
 def setUp(self):
     super(SetLiveWallpaperBlackHole, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._liveWallpaper = WallpaperImpl()
     self._liveWallpaper.reset_wallpaper()