Beispiel #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)
Beispiel #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_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)
Beispiel #6
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_new_title(self, webdriver):
     portal = Portal()
     assert portal.create_new_title(webdriver)
 def test_login_valid_credentials(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver,
                         username="******",
                         password="******")
 def test_navigate_to_login_page(self, webdriver):
     portal = Portal()
     assert portal.navigate_to_login_page(webdriver)
Beispiel #10
0
 def test_navigate_to_season_page(self, webdriver, Login):
     portal = Portal()
     assert portal.navigate_to_seasons_page(webdriver)
Beispiel #11
0
 def test_minimum_password_length_of_eight_8_allowed(self, webdriver):
     portal = Portal()
     assert portal.login(webdriver,
                         username="******",
                         password="******")
Beispiel #12
0
 def test_login_invalid_credentials(self, webdriver):
     portal = Portal()
     assert not portal.login(
         webdriver, username="******", password="******")
Beispiel #13
0
 def test_add_user(self,webdriver):
     portal = Portal()
     assert portal.login(webdriver, username="******",password="******")
     assert portal.logout(webdriver)