def tearDown(self): print "[Teardown]: %s" % self._test_name super(ComposeUI, self).tearDown() self._composeui.delete_local_video() self.photos.rm_delete_photos() self.photos.refresh_sdcard() ImageDetails.delete_picture() ImageDetails.set_workaround()
def setUpClass(self): """ install apk """ super(ImageEdit, self).setUpClass() self.photos = get_photo_implement() self.photos.rm_delete_photos() self.photos.refresh_sdcard() 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, 'content_picture') arti = Artifactory(cfg_arti.get('location')) pic_name = cfg.get("bmp") file_path = arti.get(pic_name) g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures') ImageDetails.set_workaround()
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 tearDown(self): print "[Teardown]: %s" % self._test_name super(ComposeUI, self).tearDown() ImageDetails.delete_picture() ImageDetails.set_workaround()
def tearDown(self): print "[Teardown]: %s" % self._test_name super(ComposeUI, self).tearDown() ImageDetails.delete_picture() ImageDetails.set_workaround() g_common_obj.set_vertical_screen()