From aba92ddd2c5779a25a041f56a6ef25001d00573a Mon Sep 17 00:00:00 2001 From: mediaminister <45148099+mediaminister@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:11:04 +0200 Subject: [PATCH] Fix tests (#1194) --- resources/lib/metadata.py | 4 ++-- tests/test_routing.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/metadata.py b/resources/lib/metadata.py index 2f229b6f..cb8efa8c 100644 --- a/resources/lib/metadata.py +++ b/resources/lib/metadata.py @@ -94,13 +94,13 @@ def get_context_menu(self, api_data, program_name, cache_file): extras = {'move_down': True} context_menu.append(( localize(30412, title=follow_suffix), # Unfollow - 'RunPlugin(%s)' % url_for('unfollow', program_name=program_name, title=program_title, program_id=program_id, **extras) + 'RunPlugin(%s)' % url_for('unfollow', program_id=program_id, program_title=program_title) )) favorite_marker = '[COLOR={highlighted}]ᵛ[/COLOR]' else: context_menu.append(( localize(30411, title=follow_suffix), # Follow - 'RunPlugin(%s)' % url_for('follow', program_name=program_name, title=program_title, program_id=program_id) + 'RunPlugin(%s)' % url_for('follow', program_id=program_id, program_title=program_title) )) # GO TO PROGRAM diff --git a/tests/test_routing.py b/tests/test_routing.py index 103ea94d..e9b3ef7d 100644 --- a/tests/test_routing.py +++ b/tests/test_routing.py @@ -184,15 +184,15 @@ def test_search_menu(self): @unittest.skipUnless(xbmc_addon.settings.get('password'), 'Skipping as VRT password is missing.') def test_follow_route(self): """Follow method: /follow//""" - addon.run(['plugin://plugin.video.vrt.nu/follow/thuis/Thuis', '0', '']) - self.assertEqual(plugin.url_for(addon.follow, program_name='thuis', title='Thuis'), 'plugin://plugin.video.vrt.nu/follow/thuis/Thuis') + addon.run(['plugin://plugin.video.vrt.nu/follow/1459955889901/Thuis', '0', '']) + self.assertEqual(plugin.url_for(addon.follow, program_id='1459955889901', program_title='Thuis'), 'plugin://plugin.video.vrt.nu/follow/1459955889901/Thuis') @unittest.skipUnless(xbmc_addon.settings.get('username'), 'Skipping as VRT username is missing.') @unittest.skipUnless(xbmc_addon.settings.get('password'), 'Skipping as VRT password is missing.') def test_unfollow_route(self): """Unfollow method: /unfollow/<program>/<title>""" addon.run(['plugin://plugin.video.vrt.nu/unfollow/thuis/Thuis', '0', '']) - self.assertEqual(plugin.url_for(addon.unfollow, program_name='thuis', title='Thuis'), 'plugin://plugin.video.vrt.nu/unfollow/thuis/Thuis') + self.assertEqual(plugin.url_for(addon.unfollow, program_id='1459955889901', program_title='Thuis'), 'plugin://plugin.video.vrt.nu/unfollow/thuis/Thuis') def test_clear_cookies_route(self): """Delete tokens method: /tokens/delete"""