def testShowWithSubtitleWithDetails(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        title = u'Rodzinka.pl: Zachcianki (80)'
        category = 'serial komediowy'
        desc = 'One line summary.'

        primary_title = u'Rodzinka.pl: Zachcianki (80)'
        secondary_title = None
        original_title = None
        genre = u"serial komediowy"
        country = u"Polska"
        year = u"2013"
        pg = ParentalRating(u"od 12 lat", 12)
        description = u"Long description"
        details = TelemanEventDetails(primary_title, secondary_title,
                                      description, original_title, year,
                                      country, genre, imdb, filmweb, photo_url,
                                      pg)

        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u'Rodzinka.pl: Zachcianki (80)')  # with original title and year
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Rodzinka.pl: Zachcianki (80)')

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u'Rodzinka.pl')  # with original title and year
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")
        self.assertEqual(event.get_filename(), u'Rodzinka.pl (80) Zachcianki')

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(), u'Rodzinka.pl')  # with year
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")
        self.assertEqual(event.get_filename(), u'Rodzinka.pl (80) Zachcianki')

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u'Rodzinka.pl')  # with original title
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(), u'Rodzinka.pl')  # nothing
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u'Rodzinka.pl [od 12 lat]')  # with original title, year and age
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        self.assertEqual(event.get_title(),
                         u'Rodzinka.pl [od 12 lat]')  # with year and age
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        self.assertEqual(
            event.get_title(),
            u'Rodzinka.pl [od 12 lat]')  # with original title and age
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        self.assertEqual(event.get_title(),
                         u'Rodzinka.pl [od 12 lat]')  # with age
        self.assertEqual(event.get_subtitle(), "Zachcianki")
        self.assertEqual(event.get_episode_num(), "80")

        self.assertEqual(event.get_description(),
                         u'One line summary.Long description')
    def testShowWithoutEpisodeNumWithoutSubtitleWithoutDetails(self):
        channel = Channel("x", "x", "x")

        title = u"Uwaga"
        category = "magazyn reporterów"
        desc = "One line summary."

        main_category = "Show/Game show"
        time_start = "2013-01-02 02:10:00"
        time_end = "2013-01-02 03:50:00"
        url = None

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=True, add_year_to_title=True, add_age_rating_to_title=18
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with original title and year

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=False, add_year_to_title=True, add_age_rating_to_title=18
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with year

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=True, add_year_to_title=False, add_age_rating_to_title=18
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with original title

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=False, add_year_to_title=False, add_age_rating_to_title=18
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # nothing

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=True, add_year_to_title=True, add_age_rating_to_title=12
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with original title, year and age

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=False, add_year_to_title=True, add_age_rating_to_title=12
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with year and age

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=True, add_year_to_title=False, add_age_rating_to_title=12
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with original title and age

        parser_options = ParserOptions(
            split_title=False, add_original_title_to_title=False, add_year_to_title=False, add_age_rating_to_title=12
        )
        event = TelemanEvent(
            parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None
        )
        self.assertEqual(event.get_title(), u"Uwaga")  # with age

        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_description(), "One line summary.")
Ejemplo n.º 3
0
    def testMovie(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        primary_title = 'Liberator 2'
        secondary_title = ''
        description = u"description"
        original_title = u"original title"
        year = u"2009"
        country = u"USA"
        genre = u"FILM GANGSTERSKI"
        pg = ParentalRating(u"od 16 lat", 16)
        details = TelemanEventDetails(primary_title, secondary_title, description, original_title, year, country, genre, imdb, filmweb, photo_url, pg)
        
        title = 'Megahit: Liberator 2'
        main_category = 'Movie/Drama'
        category = 'film sensacyjny, USA 1995'
        desc = 'summary'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"original title (2009) - Liberator 2 [od 16 lat] [Megahit]")
        self.assertEqual(event.get_filename(), u"original title (2009) - Liberator 2 [od 16 lat] [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "Liberator 2 [od 16 lat] [Megahit]")
        self.assertEqual(event.get_filename(), u"Liberator 2 [od 16 lat] [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"original title - Liberator 2 [od 16 lat] [Megahit]")
        self.assertEqual(event.get_filename(), u"original title - Liberator 2 [od 16 lat] [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "Liberator 2 [od 16 lat] [Megahit]")
        self.assertEqual(event.get_filename(), u"Liberator 2 [od 16 lat] [Megahit]")


        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"original title (2009) - Liberator 2 [Megahit]")
        self.assertEqual(event.get_filename(), u"original title (2009) - Liberator 2 [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "Liberator 2 [Megahit]")
        self.assertEqual(event.get_filename(), u"Liberator 2 [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"original title - Liberator 2 [Megahit]")
        self.assertEqual(event.get_filename(), u"original title - Liberator 2 [Megahit]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "Liberator 2 [Megahit]")
        self.assertEqual(event.get_filename(), u"Liberator 2 [Megahit]")


        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_description(), u'summarydescription\nTytul oryginalny:original title')
Ejemplo n.º 4
0
    def testShow3(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        title = u'Na linii strzału 2 (15)'
        category = 'serial sensacyjny'
        desc = 'One line summary.'

        primary_title = 'Na linii strzału'
        secondary_title = 'sezon 2 odc. 15'
        original_title = "In Plain Sight: In My Humboldt Opinion"
        genre = u"serial sensacyjny"
        country = u"USA"
        year = u"2009"
        pg = ParentalRating(u"od 16 lat", 16)
        description = u"Long description"
        details = TelemanEventDetails(primary_title, secondary_title,
                                      description, original_title, year,
                                      country, genre, imdb, filmweb, photo_url,
                                      pg)

        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None
        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(
        ), u'In Plain Sight: In My Humboldt Opinion - Na linii strza\u0142u 2 (15)'
                         )  # with original title and year

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u'Na linii strza\u0142u 2 (15)')  # with year

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15)'
        )  # with original title

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u'Na linii strzału 2 (15)')  # nothing

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(
        ), u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15) [od 16 lat]'
                         )  # with original title, year and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u'Na linii strzału 2 (15) [od 16 lat]')  # with year and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(
        ), u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15) [od 16 lat]'
                         )  # with original title and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u'Na linii strzału 2 (15) [od 16 lat]')  # with age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(
            event.get_description(),
            "One line summary.Long description\nTytul oryginalny:In Plain Sight: In My Humboldt Opinion"
        )
Ejemplo n.º 5
0
    def testShowWithEpisodeNumWithoutSubtitleWithoutDetails(self):
        channel = Channel('x','x',"x")

        title = u'Barwy szczęścia (948)'
        category = 'serial obyczajowy'
        desc = 'One line summary.'
        
        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)') # with original title and year
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')
        
         
        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)') # with year 
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        
        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)') # with original title 
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)')# nothing
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')


        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)')# with original title, year and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)')# with year and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)') # with original title and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia (948)') # with age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')




        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia') # with original title and year
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')
        
         
        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia') # with year 
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        
        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia') # with original title 
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia')# nothing
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')


        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia')# with original title, year and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia')# with year and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia') # with original title and age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=None)
        self.assertEqual(event.get_title(), u'Barwy szczęścia') # with age
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), "948")
        self.assertEqual(event.get_filename(), u'Barwy szczęścia (948)')

        
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_description(), "One line summary.")
    def testShowWithoutEpisodeNumWithoutSubtitleWithoutDetails(self):
        channel = Channel('x', 'x', "x")

        title = u'Uwaga'
        category = 'magazyn reporterów'
        desc = 'One line summary.'

        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(),
                         u'Uwaga')  # with original title and year

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(), u'Uwaga')  # with year

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(), u'Uwaga')  # with original title

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(), u'Uwaga')  # nothing

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(),
                         u'Uwaga')  # with original title, year and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(), u'Uwaga')  # with year and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(),
                         u'Uwaga')  # with original title and age

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=12)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=None)
        self.assertEqual(event.get_title(), u'Uwaga')  # with age

        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_description(), "One line summary.")
Ejemplo n.º 7
0
    def testShow3(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x','x',"x")

        title = u'Na linii strzału 2 (15)'
        category = 'serial sensacyjny'
        desc = 'One line summary.'
        
        primary_title = 'Na linii strzału'
        secondary_title = 'sezon 2 odc. 15'
        original_title = "In Plain Sight: In My Humboldt Opinion"
        genre = u"serial sensacyjny"
        country = u"USA"
        year = u"2009"
        pg = ParentalRating(u"od 16 lat", 16)
        description = u"Long description"
        details = TelemanEventDetails(primary_title, secondary_title, description, original_title, year, country, genre, imdb, filmweb, photo_url, pg)
        
        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None
        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'In Plain Sight: In My Humboldt Opinion - Na linii strza\u0142u 2 (15)') # with original title and year 

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na linii strza\u0142u 2 (15)') # with year 

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15)') # with original title 

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na linii strzału 2 (15)')# nothing


        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15) [od 16 lat]')# with original title, year and age

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na linii strzału 2 (15) [od 16 lat]')# with year and age

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'In Plain Sight: In My Humboldt Opinion - Na linii strzału 2 (15) [od 16 lat]') # with original title and age

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na linii strzału 2 (15) [od 16 lat]') # with age


        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_description(), "One line summary.Long description\nTytul oryginalny:In Plain Sight: In My Humboldt Opinion")
    def testShowWithDetailsWithSecondaryTitle(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        title = u'Na dobre i na złe: Pierwszy dzień (518)'
        category = 'serial obyczajowy'
        desc = 'One line summary.'
        
        primary_title = u'Na dobre i na złe'
        secondary_title = u'odc. 518: Pierwszy dzień'
        original_title = None
        genre = u"serial obyczajowy"
        country = u"Polska"
        year = u"2013"
        pg = ParentalRating(u"od 12 lat", 12)
        description = u"Long description"
        details = TelemanEventDetails(primary_title, secondary_title, description, original_title, year, country, genre, imdb, filmweb, photo_url, pg)
        
        main_category = 'Show/Game show'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None
        parser_options = ParserOptions(split_title=False, add_original_title_to_title=True, add_year_to_title=True, add_age_rating_to_title=18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe: Pierwszy dzień (518)')  
        self.assertEqual(event.get_subtitle(), None)
        self.assertEqual(event.get_episode_num(), None)
        self.assertEqual(event.get_filename(), u'Na dobre i na złe: Pierwszy dzień (518)')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=True, add_year_to_title=True, add_age_rating_to_title=18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe')  # with original title and year 
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=False, add_year_to_title=True, add_age_rating_to_title=18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe')  # with year 
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=True, add_year_to_title=False, add_age_rating_to_title=18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe')  # with original title 
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=False, add_year_to_title=False, add_age_rating_to_title=18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe')  # nothing
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe (518) Pierwszy dzień')  


        parser_options = ParserOptions(split_title=True, add_original_title_to_title=True, add_year_to_title=True, add_age_rating_to_title=12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe [od 12 lat]')  # with original title, year and age
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe [od 12 lat] (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=False, add_year_to_title=True, add_age_rating_to_title=12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe [od 12 lat]')  # with year and age
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe [od 12 lat] (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=True, add_year_to_title=False, add_age_rating_to_title=12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe [od 12 lat]')  # with original title and age
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe [od 12 lat] (518) Pierwszy dzień')  

        parser_options = ParserOptions(split_title=True, add_original_title_to_title=False, add_year_to_title=False, add_age_rating_to_title=12)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u'Na dobre i na złe [od 12 lat]')  # with age
        self.assertEqual(event.get_subtitle(), u"Pierwszy dzień")
        self.assertEqual(event.get_episode_num(), "518")
        self.assertEqual(event.get_filename(), u'Na dobre i na złe [od 12 lat] (518) Pierwszy dzień')  

        self.assertEqual(event.get_description(), u'One line summary.Long description')
    def testMovie(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        primary_title = 'U Pana Boga za piecem'
        secondary_title = ""
        description = u"description"
        original_title = ""
        year = u"1998"
        country = u"Polska"
        genre = u"KOMEDIA"
        pg = ParentalRating(u"od 16 lat", 16)
        details = TelemanEventDetails(primary_title, secondary_title, description, original_title, year, country, genre, imdb, filmweb, photo_url, pg)
        
        title = 'Wakacyjny hit Jedynki: U Pana Boga za piecem'
        main_category = 'Movie/Drama'
        category = 'komedia, Polska 1998'
        desc = 'summary'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 99)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"Wakacyjny hit Jedynki: U Pana Boga za piecem")
        self.assertEqual(event.get_filename(), u"Wakacyjny hit Jedynki: U Pana Boga za piecem")

        parser_options = ParserOptions(split_title = False, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"Wakacyjny hit Jedynki: U Pana Boga za piecem (1998) [od 16 lat]")
        self.assertEqual(event.get_filename(), u"Wakacyjny hit Jedynki: U Pana Boga za piecem (1998) [od 16 lat]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 16)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")


        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = True, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = True, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_title(), "U Pana Boga za piecem [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(), u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")


        parser_options = ParserOptions(split_title = True, add_original_title_to_title = False, add_year_to_title = False, add_age_rating_to_title = 18)
        event = TelemanEvent(parser_options, channel, title, main_category, category, desc, time_start, time_end, url, details=details)
        self.assertEqual(event.get_description(), u'summarydescription')
    def testMovie(self):
        imdb_url = u"x"
        imdb_rank = u"x"
        imdb = Imdb(imdb_url, imdb_rank)
        filmweb_url = u"x"
        filmweb_rank = u"x"
        filmweb = Imdb(filmweb_url, filmweb_rank)
        photo_url = u"x"
        channel = Channel('x', 'x', "x")

        primary_title = 'U Pana Boga za piecem'
        secondary_title = ""
        description = u"description"
        original_title = ""
        year = u"1998"
        country = u"Polska"
        genre = u"KOMEDIA"
        pg = ParentalRating(u"od 16 lat", 16)
        details = TelemanEventDetails(primary_title, secondary_title,
                                      description, original_title, year,
                                      country, genre, imdb, filmweb, photo_url,
                                      pg)

        title = 'Wakacyjny hit Jedynki: U Pana Boga za piecem'
        main_category = 'Movie/Drama'
        category = 'komedia, Polska 1998'
        desc = 'summary'
        time_start = '2013-01-02 02:10:00'
        time_end = '2013-01-02 03:50:00'
        url = None

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=99)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u"Wakacyjny hit Jedynki: U Pana Boga za piecem")
        self.assertEqual(event.get_filename(),
                         u"Wakacyjny hit Jedynki: U Pana Boga za piecem")

        parser_options = ParserOptions(split_title=False,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=16)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u"Wakacyjny hit Jedynki: U Pana Boga za piecem (1998) [od 16 lat]")
        self.assertEqual(
            event.get_filename(),
            u"Wakacyjny hit Jedynki: U Pana Boga za piecem (1998) [od 16 lat]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=16)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]"
        )
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]"
        )

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=16)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]"
        )
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem (1998) [od 16 lat] [Wakacyjny hit Jedynki]"
        )

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=16)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=16)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            "U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem [od 16 lat] [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=True,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(
            event.get_title(),
            "U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")
        self.assertEqual(
            event.get_filename(),
            u"U Pana Boga za piecem (1998) [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=True,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(),
                         u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_title(),
                         "U Pana Boga za piecem [Wakacyjny hit Jedynki]")
        self.assertEqual(event.get_filename(),
                         u"U Pana Boga za piecem [Wakacyjny hit Jedynki]")

        parser_options = ParserOptions(split_title=True,
                                       add_original_title_to_title=False,
                                       add_year_to_title=False,
                                       add_age_rating_to_title=18)
        event = TelemanEvent(parser_options,
                             channel,
                             title,
                             main_category,
                             category,
                             desc,
                             time_start,
                             time_end,
                             url,
                             details=details)
        self.assertEqual(event.get_description(), u'summarydescription')