本文整理汇总了Python中myLib.miro_app.MiroApp.restart_miro方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.restart_miro方法的具体用法?Python MiroApp.restart_miro怎么用?Python MiroApp.restart_miro使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.restart_miro方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_1
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_1(self):
"""http://litmus.pculture.org/show_test.cgi?id=467 change sys language.
1. Open Preferences
2. Change the system default language
3. Restart Miro
4. Verify changes and reset
5. Restart Miro
"""
reg = MiroRegions()
miro = MiroApp()
#1. open preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.change_default_language( "Croatian")
general_tab.close_prefs()
miro.restart_miro()
miro.open_prefs(reg, menu="Datoteka", option="Postavke")
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.change_to_english_language(from_lang="Croatian")
general_tab.close_prefs()
示例2: test_5
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_5(self):
"""http://litmus.pculture.org/show_test.cgi?id=5 update install.
Litmus Test Title:: 5 - upgrade from an earlier version of miro (3.5.1)
Description:
1. Copy in Miro 3.5.1 database
2. Launch miro and verify it is upgraded to current version.
"""
miro = MiroApp()
miro.quit_miro()
db = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","databases","351sqlitedb")
myLib.config.replace_database(db)
#set the search regions
miro.restart_miro()
waitVanish("Upgrading")
waitVanish("Preparing")
time.sleep(10)
miro.handle_crash_dialog('5', db=False, test=False)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Downloading")
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
示例3: test_236
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_236(self):
"""http://litmus.pculture.org/show_test.cgi?id=236 startup, corrupt item_info_cache
Litmus Test Title:: 236 - rebuild item_info_cache on startup.
Description:
1. Clean up Miro support and vidoes directories
2. Launch - walk through 1st tieme install dialog and search everywhere
"""
reg = MiroRegions()
miro = MiroApp()
folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
miro.add_watched_folder(reg, folder_path)
miro.quit_miro()
myLib.config.delete_preferences()
setAutoWaitTimeout(myLib.testvars.timeout)
#set the search regions
miro.restart_miro()
miro.first_time_startup_dialog(lang="Default",run_on_start="No",search="No",search_path=None,itunes="No")
waitVanish("Preparing")
time.sleep(10)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Videos")
miro.tab_search(reg, title="Deerhunter",confirm_present=True)
示例4: test_444
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_444(self):
"""http://litmus.pculture.org/show_test.cgi?id=444 external dl errors.
1. http file url to download
2. open with File Download menu
3. Verify download completes
4. Check title display via screenshot
"""
item_url = "http://www.youtube.com/watch?v=LU-ZQWZSGfc&feature=fvhr"
item_title = "watch"
reg = MiroRegions()
miro = MiroApp()
miro.cancel_all_downloads(reg)
dl_status = miro.download_from_a_url(reg, item_url, item_title)
print dl_status
self.assertTrue(dl_status == "failed")
miro.quit_miro()
miro.restart_miro()
miro.click_sidebar_tab(reg, "Downloading")
assert reg.m.exists(Pattern("file_not_found.png"))
reg.m.click(item_title)
type(Key.DELETE)
miro.click_sidebar_tab(reg, "Videos")
reg.s.waitVanish("Downloading")
示例5: test_173
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_173(self):
"""http://litmus.pculture.org/show_test.cgi?id=173 1st time install, search everywhere
Litmus Test Title:: 173 - 1st time install, search everywhere
Description:
1. Clean up Miro support and vidoes directories
2. Launch - walk through 1st tieme install dialog and search everywhere
"""
miro = MiroApp()
miro.quit_miro()
myLib.config.delete_database_and_prefs()
myLib.config.delete_miro_video_storage_dir()
#set the search regions
miro.restart_miro()
search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
miro.first_time_startup_dialog(lang="Default",
run_on_start="No",
search="Yes",
search_path="Everywhere",
itunes="No")
time.sleep(10)
reg = MiroRegions()
miro = MiroApp()
miro.click_sidebar_tab(reg, "Videos")
find(Pattern("sort_name_normal.png"))
doubleClick(getLastMatch().below(100))
miro.verify_video_playback(reg)
示例6: test_999reset
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_999reset(self):
"""fake test to reset db and preferences.
"""
miro = MiroApp()
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
miro.restart_miro()
示例7: setUp
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def setUp(self):
self.verificationErrors = []
miro = MiroApp()
print "starting test: ",self.shortDescription()
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
miro.restart_miro()
time.sleep(10)
示例8: test_441
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_441(self):
"""http://litmus.pculture.org/show_test.cgi?id=441 delete podcast item outside of miro
1. add TWO STUPID feed
2. download the Flip Faceitem
3. restart miro
4. delete the item
5. restart miro
6. verify item still deleted
"""
reg = MiroRegions()
miro = MiroApp()
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.close_prefs()
url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml"
feed = "TWO STUPID"
title = "Flip" # item title updates when download completes
#add feed and download flip face item
miro.add_feed(reg, url,feed)
miro.toggle_normal(reg)
miro.tab_search(reg, title)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.wait_for_item_in_tab(reg, tab="Videos",item=title)
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
filepath = miro.store_item_path(reg)
if os.path.exists(filepath):
print "able to verify on os level"
found_file = True
miro.tab_search(reg, title)
reg.m.click(title)
type(Key.DELETE)
if found_file == True:
if os.path.exists(filepath):
self.fail("file not deleted from filesystem")
else:
miro.quit_miro()
miro.restart_miro()
miro.click_podcast(reg, feed)
miro.tab_search(reg, term)
if not reg.m.exists(Pattern("button_download.png")):
self.fail("no download button, file not deleted")
else:
reg.m.click(Pattern("button_download.png"))
if miro.confirm_download_started(reg, title) != "in_progress":
self.fail("item not properely deleted")
#cleanup
miro.delete_feed(reg, feed)
示例9: test_001setup
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_001setup(self):
"""fake test to reset db and preferences.
"""
miro = MiroApp()
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
miro.restart_miro()
time.sleep(10)
示例10: test_001setup
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_001setup(self):
"""Pre subgroup run cleanup and preferences check.
This isn't a real tests and is just meant to make sure the subgroup is starting with usual preferences settings and clean sidebar.
"""
miro = MiroApp()
miro.quit_miro()
config.set_def_db_and_prefs()
miro.restart_miro()
time.sleep(10)
示例11: setUp
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def setUp(self):
reg = MiroRegions()
miro = MiroApp()
self.verificationErrors = []
print "starting test: ",self.shortDescription()
myLib.config.set_image_dirs()
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
myLib.config.delete_miro_downloaded_files()
miro.restart_miro()
time.sleep(10)
示例12: test_362
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_362(self):
"""http://litmus.pculture.org/show_test.cgi?id=362 edit item music to video
1. add Feed
2. download Paris mp3
3. Edit item from Audio to Video
4. Verify item played as video item
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
feed = "MIXED"
term = "Paris"
title = "Laren"
new_type = "Video"
old_type = "Music"
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.show_audio_in_music("on")
general_tab.show_videos_in_videos("on")
podcasts_tab = prefs.open_tab("Podcasts")
podcasts_tab.autodownload_setting("Off")
podcasts_tab.close_prefs()
#add feed and download joo joo item
miro.add_feed(reg, url,feed)
miro.tab_search(reg, term)
if reg.m.exists("button_download.png",10):
click(reg.m.getLastMatch())
miro.wait_for_item_in_tab(reg, "Music",item=title)
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
miro.edit_item_type(reg, new_type, old_type)
#locate item in audio tab and verify playback
miro.wait_for_item_in_tab(reg, tab="Video",item=title)
reg.m.doubleClick(title)
miro.verify_video_playback(reg)
miro.quit_miro()
miro.restart_miro()
miro.wait_for_item_in_tab(reg, tab="Video",item=title)
#cleanup
miro.delete_feed(reg, feed)
示例13: setUp
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def setUp(self):
""" All playlist tests require data. Going to add feed and watched folder at the start of the subgroup.
"""
self.verificationErrors = []
miro = MiroApp()
print "starting test: ",self.shortDescription()
myLib.config.set_image_dirs()
miro.quit_miro()
myLib.config.set_def_db_and_prefs()
miro.restart_miro()
time.sleep(10)
reg = MiroRegions()
miro = MiroApp()
feed = "TestData"
folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
miro.add_watched_folder(reg, folder_path)
示例14: test_235
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_235(self):
"""http://litmus.pculture.org/show_test.cgi?id=235 startup missing movies dir, no downloads
Litmus Test Title:: 235 - startup missing movies dir.
Description:
1. delete movies dir, launch miro
2.
"""
reg = MiroRegions()
miro = MiroApp()
miro.quit_miro()
myLib.config.delete_miro_video_storage_dir()
setAutoWaitTimeout(myLib.testvars.timeout)
#set the search regions
miro.restart_miro()
reg = MiroRegions()
miro = MiroApp()
示例15: test_198
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import restart_miro [as 别名]
def test_198(self):
"""http://litmus.pculture.org/show_test.cgi?id=198 rename folder.
Litmus Test Title:: 198 - rename feed folder
Description:
1. Import OPML file of some feeds and folders
2. 1 feed and 1 folder
3. Delete, verify confirm dialog, and delete
4. Cleanup
"""
setAutoWaitTimeout(myLib.testvars.timeout)
#set the search regions
folder = "Great Stuff"
new_name1 = "INCREDIBLE"
new_name2 = "AWFUL"
reg = MiroRegions()
miro = MiroApp()
reg.t.click("Sidebar")
reg.t.click("Folder")
time.sleep(2)
type(folder + "\n")
time.sleep(10) #give it 10 seconds to add the folder
miro.click_podcast(reg, feed=folder)
time.sleep(3)
reg.t.click("Sidebar")
reg.t.click("Rename")
time.sleep(2)
type(new_name1 + "\n")
miro.click_podcast(reg, feed=new_name1)
miro.restart_miro()
p = miro.get_podcasts_region(reg)
if not p.exists(new_name1):
self.fail("rename did not persist after restart")
else:
p.rightClick(new_name1)
p1 = Region(p.getLastMatch().nearby(200))
p1.click("Rename")
time.sleep(2)
type(new_name2 + "\n")
miro.click_podcast(reg, feed=new_name2)
miro.delete_feed(reg, new_name2)