Fix CI tests (#59)
This commit is contained in:
parent
c8a1908159
commit
57b2ac36c0
2
Makefile
2
Makefile
@ -55,7 +55,7 @@ test: test-unit
|
|||||||
|
|
||||||
test-unit:
|
test-unit:
|
||||||
@echo ">>> Running unit tests"
|
@echo ">>> Running unit tests"
|
||||||
@$(PYTHON) -m unittest discover -v -b -f
|
@$(PYTHON) -m pytest tests
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@find . -name '*.py[cod]' -type f -delete
|
@find . -name '*.py[cod]' -type f -delete
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
coverage
|
coverage
|
||||||
polib
|
polib
|
||||||
pylint
|
pylint
|
||||||
|
pytest
|
||||||
python-dateutil
|
python-dateutil
|
||||||
requests
|
requests
|
||||||
git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing
|
git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing
|
||||||
|
@ -120,7 +120,7 @@ class Player:
|
|||||||
return resolved_stream
|
return resolved_stream
|
||||||
|
|
||||||
except (InvalidLoginException, AuthenticationException) as ex:
|
except (InvalidLoginException, AuthenticationException) as ex:
|
||||||
_LOGGER.error(ex)
|
_LOGGER.exception(ex)
|
||||||
kodiutils.ok_dialog(message=kodiutils.localize(30702, error=str(ex)))
|
kodiutils.ok_dialog(message=kodiutils.localize(30702, error=str(ex)))
|
||||||
kodiutils.end_of_directory()
|
kodiutils.end_of_directory()
|
||||||
return None
|
return None
|
||||||
|
@ -74,7 +74,7 @@ class AuthApi:
|
|||||||
|
|
||||||
# Store new tokens in cache
|
# Store new tokens in cache
|
||||||
if not os.path.exists(self._token_path):
|
if not os.path.exists(self._token_path):
|
||||||
os.mkdir(self._token_path)
|
os.makedirs(self._token_path)
|
||||||
with open(os.path.join(self._token_path, self.TOKEN_FILE), 'w') as fdesc:
|
with open(os.path.join(self._token_path, self.TOKEN_FILE), 'w') as fdesc:
|
||||||
data = json.dumps(dict(
|
data = json.dumps(dict(
|
||||||
id_token=self._id_token,
|
id_token=self._id_token,
|
||||||
|
@ -64,8 +64,7 @@ class TestApi(unittest.TestCase):
|
|||||||
|
|
||||||
@unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.')
|
@unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.')
|
||||||
def test_get_drm_stream(self):
|
def test_get_drm_stream(self):
|
||||||
# https://www.zestv.be/video/ncis-new-orleans/ncis-new-orleans-seizoen-3/ncis-new-orleans-s3-aflevering-8
|
resolved_stream = self._api.get_stream_by_uuid('b56a41d9-5a6a-4ff0-b16a-56dc7b2e1f25')
|
||||||
resolved_stream = self._api.get_stream_by_uuid('5bd7211d-de78-490f-b40c-bacbee5919d2')
|
|
||||||
self.assertIsInstance(resolved_stream, ResolvedStream)
|
self.assertIsInstance(resolved_stream, ResolvedStream)
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class TestEpg(unittest.TestCase):
|
|||||||
self.assertEqual(programs, [])
|
self.assertEqual(programs, [])
|
||||||
|
|
||||||
def test_play_video_from_epg(self):
|
def test_play_video_from_epg(self):
|
||||||
epg_programs = self._epg.get_epg('vier', date.today().strftime('%Y-%m-%d'))
|
epg_programs = self._epg.get_epg('vier', 'yesterday')
|
||||||
epg_program = [program for program in epg_programs if program.video_url][0]
|
epg_program = [program for program in epg_programs if program.video_url][0]
|
||||||
|
|
||||||
# Lookup the Episode data since we don't have an UUID
|
# Lookup the Episode data since we don't have an UUID
|
||||||
|
Loading…
Reference in New Issue
Block a user