forked from add-ons/plugin.video.redbull.tv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request add-ons#30 from dagwieers/iptv-epg-fix
Fix IPTV EPG processing
- Loading branch information
Showing
4 changed files
with
93 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright: (c) 2021, Dag Wieers (@dagwieers) <[email protected]> | ||
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
"""Integration tests for IPTV Manager functionality""" | ||
|
||
# pylint: disable=invalid-name,line-too-long | ||
|
||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
from datetime import datetime, timedelta | ||
import unittest | ||
import dateutil.tz | ||
import addon | ||
|
||
xbmc = __import__('xbmc') | ||
xbmcaddon = __import__('xbmcaddon') | ||
xbmcgui = __import__('xbmcgui') | ||
xbmcplugin = __import__('xbmcplugin') | ||
xbmcvfs = __import__('xbmcvfs') | ||
|
||
plugin = addon.plugin | ||
now = datetime.now(dateutil.tz.tzlocal()) | ||
lastweek = now + timedelta(days=-7) | ||
|
||
|
||
class TestIPTVManager(unittest.TestCase): | ||
"""TestCase class""" | ||
|
||
def test_get_iptv_channels(self): | ||
"""Get IPTV channels""" | ||
from redbull import RedBullTV | ||
iptv_channels = RedBullTV().get_iptv_channels() | ||
# print(iptv_channels) | ||
self.assertTrue(iptv_channels) | ||
|
||
def test_get_iptv_epg(self): | ||
"""Get IPTV EPG""" | ||
from redbull import RedBullTV | ||
iptv_epg = RedBullTV().get_iptv_epg() | ||
# print(iptv_epg) | ||
self.assertTrue(iptv_epg) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |