Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister committed Oct 4, 2024
1 parent 3fb4ba2 commit 81ad15d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/lib/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/test_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/<program>/<title>"""
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"""
Expand Down

0 comments on commit 81ad15d

Please sign in to comment.