Fixed Unittests

This commit is contained in:
lomion 2021-11-08 22:48:18 +01:00
parent e0497912d0
commit 2c78919b7f

View file

@ -136,7 +136,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
movie = Movie()
await movie.load_parameters()
await movie.search_title('Dune')
self.assertEqual(movie.poster_url, "http://image.tmdb.org/t/p/w92/lr3cYNDlJcpT1EWzFH42aSIvkab.jpg")
self.assertEqual(movie.poster_url, "http://image.tmdb.org/t/p/w92/d5NXSklXo0qyIYkgV94XAgMIckC.jpg")
await movie.close_session()
async def test_movie_popular_length(self):
@ -161,7 +161,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
await list.load_parameters()
await list.query()
test_result = escape(results['results'][-1]['title'])
tested = await list.getListHtml()
tested = list.getListHtml()
tested = tested[(len(results['results'][-1]['title']) + 8) * -1:]
self.assertEqual(tested, f"""{test_result}</a></p>""")
await list.close_session()
@ -172,7 +172,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
await list.load_parameters()
await list.query()
test_result = results['results'][-1]['title']
tested = await list.getListText()
tested = list.getListText()
tested = tested[(len(results['results'][-1]['title'])) * -1:]
self.assertEqual(tested, test_result)
await list.close_session()