Fix CI tests (#59)

This commit is contained in:
Michaël Arnauts 2020-11-28 17:13:21 +01:00 committed by GitHub
parent c8a1908159
commit 57b2ac36c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -55,7 +55,7 @@ test: test-unit
test-unit:
@echo ">>> Running unit tests"
@$(PYTHON) -m unittest discover -v -b -f
@$(PYTHON) -m pytest tests
clean:
@find . -name '*.py[cod]' -type f -delete

View File

@ -1,6 +1,7 @@
coverage
polib
pylint
pytest
python-dateutil
requests
git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing

View File

@ -120,7 +120,7 @@ class Player:
return resolved_stream
except (InvalidLoginException, AuthenticationException) as ex:
_LOGGER.error(ex)
_LOGGER.exception(ex)
kodiutils.ok_dialog(message=kodiutils.localize(30702, error=str(ex)))
kodiutils.end_of_directory()
return None

View File

@ -74,7 +74,7 @@ class AuthApi:
# Store new tokens in cache
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:
data = json.dumps(dict(
id_token=self._id_token,

View File

@ -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.')
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('5bd7211d-de78-490f-b40c-bacbee5919d2')
resolved_stream = self._api.get_stream_by_uuid('b56a41d9-5a6a-4ff0-b16a-56dc7b2e1f25')
self.assertIsInstance(resolved_stream, ResolvedStream)

View File

@ -45,7 +45,7 @@ class TestEpg(unittest.TestCase):
self.assertEqual(programs, [])
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]
# Lookup the Episode data since we don't have an UUID