Пример #1
0
 def test_superuser_role_login_and_logout_valid_credentials(
         self, webdriver):
     portal = Portal()
     assert portal.login(webdriver,
                         username="******",
                         password="******")
     assert portal.logout(webdriver)
    def test_creat_new_series(self, webdriver, Login):
        portal = Portal()
        series_info = {
            'SeriesID': '12345678901234567892',
            'TitleBrief': 'Title brief',
            'TitleMedium': 'Title medium',
            'TitleLong': 'Long',
            'SummaryBrief': 'brief',
            'SummaryShort': 'short',
            'SummaryMedium': 'med',
            'SummaryLong': 'Long',
            'Genre': 'Children:Factual',
            'StudioDisplay': 'studio',
            '16x9 image': '1167563-LAND_16_9.jpg',
            '4x3 image': '1167563-LAND_N_4_3.jpg'
        }

        portal.create_new_series(webdriver, series_info, delete=True)
Пример #3
0
    def test_create_season(self, webdriver):
        portal = Portal()
        season_info = {
            'SeasonID': 'SEA__test12345',
            'Series': 'Friends4',
            'TitleBrief': 'Title brief',
            'TitleMedium': 'Title medium',
            'TitleLong': 'Long',
            'SummaryBrief': 'brief',
            'SummaryShort': 'short',
            'SummaryMedium': 'med',
            'SummaryLong': 'long',
            'SeasonNumber': '1',
            'TotalEpisodes': '21',
            'ProductionYear': '1990',
            '16x9 image': '\\isilon\\test_images\\1167563-LAND_16_9.jpg',
            '4x3 image': '\\isilon\\test_images\\1167563-LAND_N_4_3.jpg'
        }

        portal.create_new_season(webdriver, season_info)
    def test_portal_asset(self,webdriver,Login,test):
        
        '''Delete or create'''
        create=True
        update=False
        delete=False
        
        '''read test data'''
        series_info = test[1].get('series_info')
        season_info = test[1].get('season_info')
        portal_asset = test[1].get('portal_asset')
        platform_offers = test[1].get('platform')
       
        '''for debugging JSON data'''
        #print test
        #print json.dumps(test,indent=4, separators=(',', ': '))
        
        portal = Portal()
        
        #Take from the spread sheet create
        if(create):
#             '''check the series can be created'''
#             if(not series_info['TitleBrief']==None):
#                 '''check series already created and skip creation else create'''
#                 #if(not portal.exists_series(webdriver, series_info['TitleBrief'], navigate=True)):
#                 '''No need for an assert here the function contains asserts'''
#                 portal.create_new_series(webdriver, series_info,delete=False)
#                 
#                 '''check season already created and skip creation else create'''
#                 #if(not portal.exists_season(webdriver, season_info['TitleBrief'], navigate=True)):
#                 portal.create_new_season(webdriver, season_info,delete=False)
                     
            '''create new episodic or non-episodic asset'''
            if(not portal.exists_title(webdriver, portal_asset['Title'],navigate=True)):
                portal.create_asset_placeholders(webdriver, portal_asset, platform_offers)
            
        if(update):
            pass
        
        if(delete):
            pass
    def test_portal_asset(self, webdriver, Login, test):
        '''Delete or create'''
        create = True
        update = False
        delete = False
        '''read test data'''
        series_info = test[1].get('series_info')
        season_info = test[1].get('season_info')
        portal_asset = test[1].get('portal_asset')
        platform_offers = test[1].get('platform')
        '''for debugging JSON data'''
        #print test
        #print json.dumps(test,indent=4, separators=(',', ': '))

        portal = Portal()

        #Take from the spread sheet create
        if (create):
            #             '''check the series can be created'''
            #             if(not series_info['TitleBrief']==None):
            #                 '''check series already created and skip creation else create'''
            #                 #if(not portal.exists_series(webdriver, series_info['TitleBrief'], navigate=True)):
            #                 '''No need for an assert here the function contains asserts'''
            #                 portal.create_new_series(webdriver, series_info,delete=False)
            #
            #                 '''check season already created and skip creation else create'''
            #                 #if(not portal.exists_season(webdriver, season_info['TitleBrief'], navigate=True)):
            #                 portal.create_new_season(webdriver, season_info,delete=False)
            '''create new episodic or non-episodic asset'''
            if (not portal.exists_title(
                    webdriver, portal_asset['Title'], navigate=True)):
                portal.create_asset_placeholders(webdriver, portal_asset,
                                                 platform_offers)

        if (update):
            pass

        if (delete):
            pass
 def test_create_season(self,webdriver):
     portal = Portal()
     season_info = {'SeasonID':'SEA__test12345',
                    'Series':'Friends4',
                    'TitleBrief':'Title brief',
                    'TitleMedium':'Title medium',
                    'TitleLong':'Long',
                    'SummaryBrief':'brief',
                    'SummaryShort':'short',
                    'SummaryMedium':'med',
                    'SummaryLong':'long',
                    'SeasonNumber':'1',
                    'TotalEpisodes':'21',
                    'ProductionYear':'1990',
                    '16x9 image':'\\isilon\\test_images\\1167563-LAND_16_9.jpg',
                    '4x3 image':'\\isilon\\test_images\\1167563-LAND_N_4_3.jpg'}
     
     
     portal.create_new_season(webdriver, season_info)
     
     
     
Пример #7
0
 def test_add_user(self,webdriver):
     portal = Portal()
     assert portal.login(webdriver, username="******",password="******")
     assert portal.logout(webdriver)
Пример #8
0
 def test_create_new_title(self, webdriver):
     portal = Portal()
     assert portal.create_new_title(webdriver)
Пример #9
0
 def test_login_valid_credentials(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver,
                         username="******",
                         password="******")
Пример #10
0
 def test_navigate_to_login_page(self, webdriver):
     portal = Portal()
     assert portal.navigate_to_login_page(webdriver)
 def test_login_invalid_credentials(self,webdriver):
     portal = Portal()
     assert not portal.login(webdriver, username="******",password="******")
 def test_minimum_password_length_of_eight_8_allowed(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver, username="******", password="******")
Пример #13
0
def Login(request,webdriver):
    from portal.portal_module import Portal
    config = PortalConfig()
    portal = Portal()
    assert portal.login(webdriver, username=config.username(),password=config.password())
    '''set the provider e.g. NBCU'''
    def test_create(self,webdriver,Login):
        '''
        Test Data
        '''
        portal_asset={'asset_id':'123456789012345',
                      'channel':'Test Channel 2',
                      'series':'',
                      'season':'Friends4 season 3',
                      'episodeNumber':'1',
                      'TotalEpisodes':'50',
                      'Title':'Some Title',
                      'Summary':'',
                      'Actors':'Noah Wyle, Rebecca Romijn, Christian Kane',
                      'Warning':'This movie may contain flashing images',
                      'DisplayRuntime':'0:20',
                      'Genre':'Specialist:Adult',
                      'Rating':'All Ages',
                      'BroadcastDate':'03/05/2016',
                      'ProductionYear':'1990',
                      'Studio':'Some Studio Code',
                      'VideoFile':'auto_test_media_asset_01.mxf',
                      'SubTitles':'BC073608_1.stl',
                      '16-9-image':'167563-LAND_16_9.jpg',
                      '4-3-image':'167563-LAND_N_4_3.jpg',
                      'Boxart-image':'BOX.jpg'}
          
        '''
        Test data for offers
          
            "platform": {
                "AS": {
                    "Platform": "AS",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                },
                "AM": {
                    "Platform": "AM",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                },
                "AT": {
                    "Platform": "AT",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                }
            }
          
        '''
          
        platform_offers = {
                           "AS": {
                                "Platform": "AS",
                                "EndDate": "2016-05-31 00:00:00",
                                "Type": "Catchup",
                                "StartDate": "2016-05-24 00:00:00"
                            },
                            "AM": {
                                "Platform": "AM",
                                "EndDate": "2016-05-31 00:00:00",
                                "Type": "Catchup",
                                "StartDate": "2016-05-24 00:00:00"
                            },
                            "AT": {
                                "Platform": "AT",
                                "EndDate": "2016-05-31 00:00:00",
                                "Type": "Catchup",
                                "StartDate": "2016-05-24 00:00:00"
                            }
                        }
          
        portal = Portal()
        '''No need for an assert here the function contains asserts'''
        portal.create_asset_placeholders(webdriver,portal_asset,platform_offers)
        
        
        #     def test_navigate_to_login_page(self,webdriver):
#         portal = Portal()
#         assert portal.navigate_to_login_page(webdriver)
#   
#     def test_login_valid_credentials(self,webdriver):
#         portal = Portal()
#         config = PortalConfig()
#         assert portal.login(webdriver, username=config.username(),password=config.password())

#     '''Set the provider to 2'''
#     def test_change_provider(self,webdriver):
#         portal = Portal()
#         assert portal.set_provider(webdriver,provider=2)
 
#     '''
#     @author: Dervis Suleyman
#     @summary: Check if the .mxfs are in the isilon for the portal if not copy them from the project, to ensure you are ready for automated testing 
#     '''
#     def test_navigate_to_media_page(self,webdriver):
#         portal = Portal()
#         assert portal.navigate_to_media_page(webdriver)
#         
#     def test_check_media_content_is_present(self,webdriver):
#         portal = Portal()
#         content=['auto_test_media_asset_01']
#         content_file_path='C:\\workspace\\AtlasPortalAutomation\\isilon\\test_media'
#         dropzone='/mnt/dmz/atlas_provider_2/drop/'
#         portal.check_media_content_is_present(webdriver,content,content_file_path,destination_folder=dropzone)

  
#     '''
#     @note: The login test should leave the user logged into the machine
#     '''
#     def test_navigate_to_new_title_page(self,webdriver):
#         portal = Portal()
#         assert portal.navigate_to_create_new_title_page(webdriver, True)
        
#     '''
#     @author: Dervis Suleyman
#     @summary: Create a new non-episodic asset
#     '''
#     def test_check_title_exists(self,webdriver):
#         portal = Portal()
#         '''No need for an assert here the function contains asserts'''
#         assert portal.exists_title(webdriver, "ST stage non-epi t3")
#         
#     '''
#     @author: Dervis Suleyman
#     @summary: Create a new non-episodic asset
#     '''
#     def test_negative_search_check(self,webdriver):
#         portal = Portal()
#         '''No need for an assert here the function contains asserts'''
#         assert portal.exists_title(webdriver, "Invalid Search")
        
        
        
        
Пример #15
0
 def test_login_invalid_credentials(self, webdriver):
     portal = Portal()
     assert not portal.login(
         webdriver, username="******", password="******")
Пример #16
0
    def test_create_new_title(self,webdriver):
        portal = Portal()
        assert portal.create_new_title(webdriver)

        
Пример #17
0
 def test_login_valid_credentials(self,webdriver):
     portal = Portal()
     assert portal.login(webdriver, username="******",password="******")
Пример #18
0
 def test_navigate_to_login_page(self,webdriver):
     portal = Portal()
     assert portal.navigate_to_login_page(webdriver)
 def test_navigate_to_season_page(self, webdriver,Login):
     portal = Portal()
     assert portal.navigate_to_seasons_page(webdriver)
Пример #20
0
 def test_minimum_password_length_of_eight_8_allowed(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver,
                         username="******",
                         password="******")
Пример #21
0
 def test_navigate_to_season_page(self, webdriver, Login):
     portal = Portal()
     assert portal.navigate_to_seasons_page(webdriver)
    def test_create(self, webdriver, Login):
        '''
        Test Data
        '''
        portal_asset = {
            'asset_id': '123456789012345',
            'channel': 'Test Channel 2',
            'series': '',
            'season': 'Friends4 season 3',
            'episodeNumber': '1',
            'TotalEpisodes': '50',
            'Title': 'Some Title',
            'Summary': '',
            'Actors': 'Noah Wyle, Rebecca Romijn, Christian Kane',
            'Warning': 'This movie may contain flashing images',
            'DisplayRuntime': '0:20',
            'Genre': 'Specialist:Adult',
            'Rating': 'All Ages',
            'BroadcastDate': '03/05/2016',
            'ProductionYear': '1990',
            'Studio': 'Some Studio Code',
            'VideoFile': 'auto_test_media_asset_01.mxf',
            'SubTitles': 'BC073608_1.stl',
            '16-9-image': '167563-LAND_16_9.jpg',
            '4-3-image': '167563-LAND_N_4_3.jpg',
            'Boxart-image': 'BOX.jpg'
        }
        '''
        Test data for offers
          
            "platform": {
                "AS": {
                    "Platform": "AS",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                },
                "AM": {
                    "Platform": "AM",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                },
                "AT": {
                    "Platform": "AT",
                    "EndDate": "2016-05-31 00:00:00",
                    "Type": "Catchup",
                    "StartDate": "2016-05-24 00:00:00"
                }
            }
          
        '''

        platform_offers = {
            "AS": {
                "Platform": "AS",
                "EndDate": "2016-05-31 00:00:00",
                "Type": "Catchup",
                "StartDate": "2016-05-24 00:00:00"
            },
            "AM": {
                "Platform": "AM",
                "EndDate": "2016-05-31 00:00:00",
                "Type": "Catchup",
                "StartDate": "2016-05-24 00:00:00"
            },
            "AT": {
                "Platform": "AT",
                "EndDate": "2016-05-31 00:00:00",
                "Type": "Catchup",
                "StartDate": "2016-05-24 00:00:00"
            }
        }

        portal = Portal()
        '''No need for an assert here the function contains asserts'''
        portal.create_asset_placeholders(webdriver, portal_asset,
                                         platform_offers)
 def test_user_role_login_and_logout_valid_credentials(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver, username="******", password="******")
     assert portal.logout(webdriver)