コード例 #1
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #2
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #3
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #4
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #5
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #6
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #7
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #8
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #9
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #10
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #11
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #12
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #13
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #14
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #15
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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
コード例 #16
0
ファイル: test_provider.py プロジェクト: noba3/KoTos
    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