Esempio n. 1
0
    def test_format_content(self):
        provider = Provider()

        # test full
        context = kodion.Context(path='/pro7/library/789/')
        context.get_function_cache()._clear()
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 2)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)

        # test clips
        context = kodion.Context(path='/pro7/library/789/', params={'clip_type': 'short'})
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)

        # test backstage
        context = kodion.Context(path='/pro7/library/789/', params={'clip_type': 'webexclusive'})
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)
        pass
Esempio n. 2
0
    def test_format_content(self):
        provider = Provider()

        # test full
        context = kodion.Context(path='/pro7/library/789/')
        context.get_function_cache()._clear()
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 2)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)

        # test clips
        context = kodion.Context(path='/pro7/library/789/',
                                 params={'clip_type': 'short'})
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)

        # test backstage
        context = kodion.Context(path='/pro7/library/789/',
                                 params={'clip_type': 'webexclusive'})
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)
        print_items(items)
        pass
Esempio n. 3
0
    def test_channel_highlights(self):
        provider = Provider()

        # test root of highlights
        context = kodion.Context(path='/pro7/highlights/')
        result = provider.navigate(context)
        items = result[0]

        self.assertEqual(3, len(items))
        print_items(items)

        # test 'Beliebte Sendungen' of highlights
        context = kodion.Context(path='/pro7/highlights/Beliebte Sendungen/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)

        # test 'Aktuelle ganze Folgen' of highlights
        context = kodion.Context(path='/pro7/highlights/Aktuelle ganze Folgen/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)

        # test 'Neueste Clips' of highlights
        context = kodion.Context(path='/pro7/highlights/Neueste Clips/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)
        pass
Esempio n. 4
0
    def test_search(self):
        provider = Provider()

        path = '/%s/query/' % kodion.constants.paths.SEARCH
        context = kodion.Context(path=path, params={'q': 'halligalli'})
        result = provider.navigate(context)
        pass
Esempio n. 5
0
    def test_search(self):
        provider = Provider()

        path = '/%s/query/' % kodion.constants.paths.SEARCH
        context = kodion.Context(path=path, params={'q': 'halligalli'})
        result = provider.navigate(context)
        pass
Esempio n. 6
0
    def test_format_next_page(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/library/505/')
        result = provider.navigate(context)

        items = result[0]
        item = items[len(items)-1]
        self.assertEqual('Next Page', item.get_name())
        pass
Esempio n. 7
0
    def test_format_next_page(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/library/505/')
        result = provider.navigate(context)

        items = result[0]
        item = items[len(items) - 1]
        self.assertEqual('Next Page', item.get_name())
        pass
Esempio n. 8
0
    def test_latest_videos(self):
        provider = Provider()

        context = kodion.Context(path='/favs/latest/')
        format_item = DirectoryItem(u'Test',
                                    context.create_uri(['pro7', 'library', '277']))

        context.get_favorite_list().add(format_item)
        result = provider.navigate(context)
        items = result[0]
        pass
Esempio n. 9
0
    def test_latest_videos(self):
        provider = Provider()

        context = kodion.Context(path='/favs/latest/')
        format_item = DirectoryItem(
            u'Test', context.create_uri(['pro7', 'library', '277']))

        context.get_favorite_list().add(format_item)
        result = provider.navigate(context)
        items = result[0]
        pass
Esempio n. 10
0
    def test_channel_content(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/')
        result = provider.navigate(context)
        items = result[0]

        # 'Highlights' and 'Library'
        self.assertEqual(len(items), 2)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)

        print_items(items)
        pass
Esempio n. 11
0
    def test_channel_formats(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/library/')
        #context.get_function_cache().disable()
        result = provider.navigate(context)

        items = result[0]
        self.assertGreater(len(items), 0)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)

        print_items(items)
        pass
Esempio n. 12
0
    def test_channel_content(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/')
        result = provider.navigate(context)
        items = result[0]

        # 'Highlights' and 'Library'
        self.assertEqual(len(items), 2)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)

        print_items(items)
        pass
Esempio n. 13
0
    def test_channel_formats(self):
        provider = Provider()

        context = kodion.Context(path='/pro7/library/')
        #context.get_function_cache().disable()
        result = provider.navigate(context)

        items = result[0]
        self.assertGreater(len(items), 0)

        options = result[1]
        self.assertTrue(not provider.RESULT_CACHE_TO_DISC in options)

        print_items(items)
        pass
Esempio n. 14
0
    def test_root(self):
        provider = Provider()

        # clear all
        context = kodion.Context('/')
        context.get_favorite_list().clear()
        context.get_watch_later_list().clear()

        # navigate to the root
        result = provider.navigate(context)
        items = result[0]
        self.assertEqual(len(items), 7)

        # caching should be false, so the additional directories 'Favorties' and 'Watch Later'
        # will show correctly.
        options = result[1]
        self.assertEqual(False, options[provider.RESULT_CACHE_TO_DISC])

        print_items(items)
        pass
Esempio n. 15
0
    def test_root(self):
        provider = Provider()

        # clear all
        context = kodion.Context('/')
        context.get_favorite_list().clear()
        context.get_watch_later_list().clear()

        # navigate to the root
        result = provider.navigate(context)
        items = result[0]
        self.assertEqual(len(items), 7)

        # caching should be false, so the additional directories 'Favorties' and 'Watch Later'
        # will show correctly.
        options = result[1]
        self.assertEqual(False, options[provider.RESULT_CACHE_TO_DISC])

        print_items(items)
        pass
Esempio n. 16
0
    def test_channel_highlights(self):
        provider = Provider()

        # test root of highlights
        context = kodion.Context(path='/pro7/highlights/')
        result = provider.navigate(context)
        items = result[0]

        self.assertEqual(3, len(items))
        print_items(items)

        # test 'Beliebte Sendungen' of highlights
        context = kodion.Context(path='/pro7/highlights/Beliebte Sendungen/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)

        # test 'Aktuelle ganze Folgen' of highlights
        context = kodion.Context(
            path='/pro7/highlights/Aktuelle ganze Folgen/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)

        # test 'Neueste Clips' of highlights
        context = kodion.Context(path='/pro7/highlights/Neueste Clips/')
        result = provider.navigate(context)
        items = result[0]
        self.assertGreater(len(items), 0)
        print_items(items)
        pass