def test_log_kodi_platform_version(self, mock_info_label, mock_getCondVisibility, mock_log): mock_info_label.return_value = fakes.BUILD_VERSION mock_getCondVisibility.side_effect = get_xbmc_cond_visibility utils.log_kodi_platform_version() mock_log.assert_called_once_with( '[Test Add-on v0.0.1] Kodi 18.2 running on Linux', level=xbmc.LOGINFO)
import xbmcaddon import xbmcgui from aussieaddonscommon import utils # Add our resources/lib to the python path addon_dir = xbmcaddon.Addon().getAddonInfo('path') sys.path.insert(0, os.path.join(addon_dir, 'resources', 'lib')) import categories # noqa: E402 import play # noqa: E402 import programs # noqa: E402 import series # noqa: E402 # Print our platform/version debugging information utils.log_kodi_platform_version() if __name__ == '__main__': params_str = sys.argv[2] params = utils.get_url(params_str) if (len(params) == 0): categories.make_category_list() elif 'series' in params: xbmcgui.Dialog().ok( 'Outdated Favourites Link', 'The Kodi Favourite item being accessed was created with an ' 'earlier version of the iView add-on and is no longer ' 'compatible. Please remove this link and update with a new ' 'one') elif 'play' in params: