From 755e34207118b4880c7012f21e58fe05bc29b4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Wed, 25 Mar 2020 07:50:10 +0100 Subject: [PATCH] Fix test --- test/test_api.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/test_api.py b/test/test_api.py index ad256c2..d3a0e98 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -23,8 +23,9 @@ class TestApi(unittest.TestCase): def test_programs(self): for channel in ['vier', 'vijf', 'zes']: - channels = self._api.get_programs(channel) - self.assertIsInstance(channels, list) + programs = self._api.get_programs(channel) + self.assertIsInstance(programs, list) + self.assertIsInstance(programs[0], Program) def test_episodes(self): for channel, program in [('vier', 'auwch'), ('vijf', 'zo-man-zo-vrouw')]: @@ -34,14 +35,15 @@ class TestApi(unittest.TestCase): self.assertIsInstance(program.episodes, list) self.assertIsInstance(program.episodes[0], Episode) - program_by_uuid = self._api.get_program_by_uuid(program.uuid) - self.assertIsInstance(program_by_uuid, Program) - @unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.') def test_get_stream(self): program = self._api.get_program('vier', 'auwch') - episode = program.episodes[0] + self.assertIsInstance(program, Program) + program_by_uuid = self._api.get_program_by_uuid(program.uuid) + self.assertIsInstance(program_by_uuid, Program) + + episode = program.episodes[0] video = self._api.get_stream_by_uuid(episode.uuid) self.assertTrue(video)