本文整理汇总了Python中myLib.miro_app.MiroApp.edit_item_metadata方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.edit_item_metadata方法的具体用法?Python MiroApp.edit_item_metadata怎么用?Python MiroApp.edit_item_metadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.edit_item_metadata方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_458
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import edit_item_metadata [as 别名]
def test_458(self):
"""http://litmus.pculture.org/show_test.cgi?id=458 edit blank item description
1. add TWO STUPID feed
2. download the Flip Faceitem
3. Edit item description
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://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, "Videos",item=title)
reg.m.click(title)
miro.edit_item_metadata(reg, meta_field="about",meta_value="Blank description edited")
miro.tab_search(reg, "blank description")
if reg.m.exists(title):
miro.log_result("656","test_458")
else:
miro.log_result("656","test_458",status="fail")
#cleanup
miro.delete_feed(reg, feed)
示例2: test_728
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import edit_item_metadata [as 别名]
def test_728(self):
"""http://litmus.pculture.org/show_test.cgi?id=728 edit metadata for mulitple items
1. add Static List feed
2. download the Earth Eats item
3. Edit item metadata
"""
reg = MiroRegions()
miro = MiroApp()
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.show_audio_in_music("on")
general_tab.close_prefs()
url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
feed = "Static"
term = "Earth Eats"
title = "Mushroom" # item title updates when download completes
new_type = "Video"
edit_itemlist = [
["name", "Earth Day Everyday", "647"],
["artist", "Oliver and Katerina", "648"],
["album", "Barki Barks", "649"],
["genre", "family", "650"],
["track_num" ,"1", "673"],
["track_of" ,"2", "673"],
["year", "2010", "655"],
["rating", "5", "651"],
]
#start clean
miro.delete_feed(reg, feed)
#add feed and download earth eats item
miro.add_feed(reg, url,feed)
miro.toggle_normal(reg)
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")
for x in edit_itemlist:
miro.edit_item_metadata(reg, meta_field=x[0],meta_value=x[1])
try:
miro.log_result(x[2],"test_647")
finally:
time.sleep(2)
if not miro.tab_search(reg, "Earth Day",confirm_present=True) == True:
self.fail("new title not saved")
#cleanup
miro.delete_feed(reg, feed)
示例3: test_363
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import edit_item_metadata [as 别名]
def test_363(self):
"""http://litmus.pculture.org/show_test.cgi?id=363 edit item metadata
1. add Static List feed
2. download the Earth Eats item
3. Edit item metadata
4. Verify item played as audio item
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
feed = "Static"
term = "Earth Eats"
title = "Mushroom"
new_type = "Video"
#Set Global Preferences
miro.open_prefs(reg)
prefs = PreferencesPanel()
general_tab = prefs.open_tab("General")
general_tab.show_audio_in_music("on")
general_tab.close_prefs()
miro.delete_feed(reg, feed)
#add feed and download earth eats item
miro.add_feed(reg, url,feed)
miro.toggle_normal(reg)
miro.tab_search(reg, title=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_metadata(reg, meta_field="about",meta_value="hoovercraft full of eels")
miro.tab_search(reg, "hoovercraft eels")
if not reg.m.exists(title):
self.fail("can not verify description edited")
miro.delete_feed(reg, feed)
示例4: test_653
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import edit_item_metadata [as 别名]
def test_653(self):
"""http://litmus.pculture.org/show_test.cgi?id=653 edit album art
1. add watched folder
2. Edit artwork for 1 item
3. Edit artwork for multiple items
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
time.sleep(5)
folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ArtTest")
title = "Pancakes"
title2 = "summer"
title3="deerhunter"
#1. add watched folder
miro.add_watched_folder(reg, folder_path)
if reg.s.exists("ArtTest"):
click(reg.s.getLastMatch())
miro.log_result("157","test_653")
art_file = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","album_art1.jpg")
#add feed and download flip face item
miro.toggle_normal(reg)
miro.tab_search(reg, title)
try:
reg.m.find(title)
reg.m.click(title)
reg.mtb.click("tabsearch_clear.png")
miro.edit_item_metadata(reg, meta_field="art",meta_value=art_file)
## Verify new image here:
reg.m.find(Pattern("album_art1.png"))
finally:
miro.open_prefs(reg)
prefs = PreferencesPanel()
folder_tab = prefs.open_tab("Folders")
folder_tab.remove_watched_folder("ArtTest")
folder_tab.close_prefs()