当前位置: 首页>>代码示例>>Python>>正文


Python MiroApp.add_feed方法代码示例

本文整理汇总了Python中myLib.miro_app.MiroApp.add_feed方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.add_feed方法的具体用法?Python MiroApp.add_feed怎么用?Python MiroApp.add_feed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在myLib.miro_app.MiroApp的用法示例。


在下文中一共展示了MiroApp.add_feed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_23

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_23(self):
        """http://litmus.pculture.org/show_test.cgi?id=23 remember search.

        1. Add 2-stupid-videos feed
        2. Perform a search
        3. Type in search box the delete key 
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        term = "House"
        title = "Dinosaur"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        #2. search
        miro.tab_search(reg, term)
        self.assertTrue(reg.m.exists(title))
        self.assertFalse(reg.m.exists("Flip"))
        miro.click_sidebar_tab(reg, "Videos")
        reg.s.click(feed)
        self.assertTrue(reg.mtb.exists(term.upper()))
        self.assertTrue(reg.m.exists(title))
        self.assertFalse(reg.m.exists("Flip"))
        #4. cleanup
        miro.delete_feed(reg, "stupid")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:31,代码来源:sg42_feedsearch.py

示例2: test_112

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_112(self):
        """http://litmus.pculture.org/show_test.cgi?id=112 download errors

        1. Add feed
        2. Download All
        3. Verify error messages
        """
        reg = MiroRegions()
        miro = MiroApp()
        feed_url = "http://participatoryculture.org/feeds_test/feed13.rss"
        feed_name = "Feed"

        error_types = {"Server Closes Connection": "no_connection.png",
                       "File not found": "file_not_found.png",
                       "503 Error": "no_connection.png",
                       "Host not found": "unknown_host.png",
                       "HTTP error": "http_error.png",
                       "Timeout error": "no_connection.png",
                       }
        miro.add_feed(reg, feed_url, feed_name)
        miro.set_podcast_autodownload(reg, setting="All")
        time.sleep(10)
        for error, image in error_types.iteritems():
                miro.tab_search(reg, error)
                assert reg.m.exists(Pattern(image).similar(0.6),60)
        miro.delete_feed(reg, feed_name)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:28,代码来源:sg12_downloading.py

示例3: test_78

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_78(self):
        """http://litmus.pculture.org/show_test.cgi?id=78 Menu New Search Feed.

        1. Add list of guide feeds (Static List)
        2. From Sidebar -> New Search feed, create saved search channel
        3. Verify Search saved
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "touring"
        term2 = "Biking"
        title = "Travelling Two"
        dummy_feed_url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.add_feed(reg, dummy_feed_url,"TWO STUPID")
        #2. search
        miro.new_search_feed(reg, term,radio="Podcast",source=feed)
        time.sleep(5)
                        
        #3. verify search saved
        miro.click_last_podcast(reg)
        self.assertTrue(reg.m.exists(term2))
        
        #4. cleanup
        miro.click_remove_podcast(reg)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "Static List")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:36,代码来源:sg42_feedsearch.py

示例4: test_215

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_215(self):
        """http://litmus.pculture.org/show_test.cgi?id=215 Feed search, saved search feed

        1. Add list of guide feeds (Static List)
        2. Perform a search and save it.
        3. Verify Search saved
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Gimp"
        title = "GimpKnowHow"
        
        #1. add feed
        miro.add_feed(reg, url, feed)
        #2. search
        miro.tab_search(reg, term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        miro.click_last_podcast(reg)
        #4. cleanup
        type(Key.DELETE)
        #Last chance to verify Gimp is the saved search feed.
        self.assertTrue(reg.m.exists("GIMP"),5)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "Static List")
        miro.handle_crash_dialog('215', db=False, test=False)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:33,代码来源:sg42_feedsearch.py

示例5: test_213

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_213(self):
        """http://litmus.pculture.org/show_test.cgi?id=213 Feed search, delete key.

        1. Add 2-stupid-videos feed
        2. Perform a search
        3. Type in search box the delete key 
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        title = "Flip"
        term = "dinosaur"
        
        #1. add feed
        miro.add_feed(reg, url, feed)
        #2. search
        miro.tab_search(reg, term)
        self.assertFalse(reg.m.exists(title, 5))
        reg.mtb.click(term.upper())
        for x in range(0,8):
            type(Key.LEFT)
        
        for x in range(0,8):
            type(Key.DELETE)

        self.assertTrue(reg.m.exists(title))
        #4. cleanup
        miro.delete_feed(reg, feed)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:34,代码来源:sg42_feedsearch.py

示例6: test_338

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_338(self):
        """http://litmus.pculture.org/show_test.cgi?id=338 delete feed with dl items.

        Litmus Test Title:: 338 - channels delete a feed with downloads in progress
        Description: 
        1. Add the 3-blip-videos feed. Start items downloading  
        2. Remove the feed and verify downloads are removed.
        """

      

        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()

        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"

        #1. Add the feed and start dl
        miro.cancel_all_downloads(reg)
        miro.add_feed(reg, url,feed)
        miro.download_all_items(reg)
        time.sleep(2)
        miro.confirm_download_started(reg, "The Joo")
        miro.delete_feed(reg, feed)
        time.sleep(5)
        if reg.s.exists("Downloading",5):
            self.fail("Downloading tab still present")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:30,代码来源:sg6_feeds.py

示例7: test_458

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [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)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:34,代码来源:sg58_items.py

示例8: test_214

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_214(self):
        """http://litmus.pculture.org/show_test.cgi?id=214 Feed search, search with spaces

        1. Add 3 blip videos feed
        2. Perform a search with spaces
        3. Verify Search saved
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"
        term = "strange creature"
        title = "Joo Joo"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        #2. search
        miro.tab_search(reg, term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        miro.click_last_podcast(reg)
        miro.tab_search(reg, term,confirm_present=True)
        
        #4. cleanup
        miro.click_remove_podcast(reg)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "blip")
        miro.delete_feed(reg, feed)
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:33,代码来源:sg42_feedsearch.py

示例9: test_720

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_720(self):
        """http://litmus.pculture.org/show_test.cgi?id=720 Menu New Search Feed.

        1. Add list of guide feeds (Static List)
        2. Search in the tab
        3. From Sidebar -> New Search feed, create saved search channel
        4. Verify Search saved
        5. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Voice"
                
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, term)
        #2. search
        miro.new_search_feed(reg, term, radio="Podcast", source=feed, defaults=True)
                        
        #3. verify search saved
        miro.click_last_podcast(reg)
        self.assertTrue(reg.m.exists(term, 45))
        
        #4. cleanup
        miro.click_remove_podcast(reg)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "Static List")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:33,代码来源:sg42_feedsearch.py

示例10: test_441

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [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)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:60,代码来源:sg58_items2.py

示例11: test_728

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [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)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:58,代码来源:sg58_items2.py

示例12: test_24

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_24(self):
        """http://litmus.pculture.org/show_test.cgi?id=24 edit remembered search.

        1. Add 2-stupid-videos feed
        2. Perform a search
        3. Type in search box the delete key 
        4. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        term = "Face"
        title = "Flip"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.set_podcast_autodownload(reg, setting="All")
        #2. search
        miro.tab_search(reg, term)
        self.assertTrue(reg.m.exists(title))

        url2 = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed2 = "Static"
        term2 = "FilmWeek"
        miro.add_feed(reg, url2,feed2)
        miro.tab_search(reg, "Brooklyn")
        miro.wait_for_item_in_tab(reg, "Videos",title)
        reg.m.click(title)
        type(Key.ENTER)
        time.sleep(2)
        type(" ")
        self.assertTrue(exists("playback_controls.png"))
        miro.shortcut("d")

        reg.s.click(feed2)
        self.assertTrue(reg.mtb.exists("BROOKLYN"))
        miro.tab_search(reg, term2)
        reg.mtb.click("button_save_as_podcast.png")

        miro.click_last_podcast(reg)
        miro.tab_search(reg, term2,confirm_present=True)
        miro.clear_search(reg)
        time.sleep(3)
        if not reg.mtb.exists(term2.upper()):
            miro.log_result("324","test_24",status="pass")
       

        #4. cleanup
        miro.delete_feed(reg, "stupid")
        miro.click_last_podcast(reg)
        miro.delete_current_selection(reg)
        miro.delete_feed(reg, "Static List")
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:57,代码来源:sg42_feedsearch.py

示例13: test_657

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_657(self):
        """http://litmus.pculture.org/show_test.cgi?id=657 edit multiple fields

        1. add Static List feed
        2. download the Earth Eats item
        3. Edit item metadata

        """
        
        reg = MiroRegions()
        miro = MiroApp()
        time.sleep(5)
        url = "http://ringtales.com/nyrss.xml"
        feed = "The New"
        title = "Cat" 

        new_metadata_list = [
            ["show","Animated Cartoons", "658"],
            ["episode_id","nya", "670"],
            ["season_no","25", "671"],
            ["episode_no","43", "672"],
            ["video_kind","Clip", "652"],
            ]
        
        try:       
            
            #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, title)
            if reg.m.exists("button_download.png",10):
                click(reg.m.getLastMatch())
            miro.wait_for_item_in_tab(reg, "Videos",item=title)
            miro.click_podcast(reg, feed)
            miro.tab_search(reg, title)
            reg.m.click(title)
            miro.edit_item_video_metadata_bulk(reg, new_metadata_list)
            time.sleep(2)
            miro.click_sidebar_tab(reg, "Videos")
            miro.tab_search(reg, title)
            reg.mtb.click("Clip")
            if reg.m.exists(title):
                reg.mtb.click("All")
            else:
                self.fail("item not found in Clips filter")
        
        finally:
            miro.quit_miro()
            myLib.config.set_def_db_and_prefs()
开发者ID:GunioRobot,项目名称:miro-qa,代码行数:53,代码来源:sg58_items2.py

示例14: test_361

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_361(self):
        """http://litmus.pculture.org/show_test.cgi?id=361 edit item video to audio.

        1. add 3-blip-videos feed
        2. download the Joo Joo
        3. Edit item from Video to Audio
        4. Verify item played as audio item

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
        feed = "MIXED"
        title = "Tongue"
        new_type = "Music"
        old_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.show_videos_in_videos("on")
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.close_prefs()
        
        #start clean
        miro.delete_feed(reg, feed)
        #add feed and download joo joo item
        miro.add_feed(reg, url,feed)
        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.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="Music",item=title)
        reg.m.click(title)        
        type(' ') #use spacebar to start playback
        self.assertTrue(miro.verify_audio_playback(reg, title))
        miro.stop_audio_playback(reg, title)
       
        #cleanup
        miro.delete_feed(reg, feed)
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:52,代码来源:sg58_items.py

示例15: test_108

# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import add_feed [as 别名]
    def test_108(self):
        """http://litmus.pculture.org/show_test.cgi?id=108 playback through unplayed items.

        1. add a feed url feed of small items
        2. download a few items 
        3. verify unplayed - playback through list
        4. verify marked as unplayed.

        """

        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ShortCats.xml")
        url = "file:///"+url_path
        feed = "Short Cats"
##        url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml"
##        feed = "TWO STUPID"
        
        reg = MiroRegions() 
        miro = MiroApp()


        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        playback_tab = prefs.open_tab("Playback")
        playback_tab.play_continuous("on", "Podcast")
        playback_tab.close_prefs()
        
        miro.add_feed(reg, url, feed)
        miro.set_podcast_autodownload(reg, setting="All")
        time.sleep(15)
        miro.set_podcast_autodownload(reg, setting="Off")
        if reg.s.exists("Downloading"):
            reg.s.waitVanish("Downloading")
        miro.click_sidebar_tab(reg, "Videos")
        miro.toggle_normal(reg)
        reg.m.wait("item_play_unplayed.png")
        if reg.m.exists("item_play_unplayed.png"):
            find(Pattern("sort_name_normal.png"))
            doubleClick(getLastMatch().below(100))
            wait(Pattern("playback_bar_video.png"),15)
        else:
            self.fail("no unplayed badges found")
        if exists(Pattern("playback_bar_video.png")):
            print "playback started"
            time.sleep(60)
            waitVanish(Pattern("playback_bar_video.png"))
        if reg.m.exists("item_play_unplayed.png"):
            self.fail("items not marked as unplayed")
开发者ID:jdragojevic,项目名称:miro-qa,代码行数:50,代码来源:sg26_sidebar_tabs.py


注:本文中的myLib.miro_app.MiroApp.add_feed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。