Fixed Unittests
This commit is contained in:
parent
e0497912d0
commit
2c78919b7f
|
@ -136,7 +136,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
|
||||||
movie = Movie()
|
movie = Movie()
|
||||||
await movie.load_parameters()
|
await movie.load_parameters()
|
||||||
await movie.search_title('Dune')
|
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()
|
await movie.close_session()
|
||||||
|
|
||||||
async def test_movie_popular_length(self):
|
async def test_movie_popular_length(self):
|
||||||
|
@ -161,7 +161,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
|
||||||
await list.load_parameters()
|
await list.load_parameters()
|
||||||
await list.query()
|
await list.query()
|
||||||
test_result = escape(results['results'][-1]['title'])
|
test_result = escape(results['results'][-1]['title'])
|
||||||
tested = await list.getListHtml()
|
tested = list.getListHtml()
|
||||||
tested = tested[(len(results['results'][-1]['title']) + 8) * -1:]
|
tested = tested[(len(results['results'][-1]['title']) + 8) * -1:]
|
||||||
self.assertEqual(tested, f"""{test_result}</a></p>""")
|
self.assertEqual(tested, f"""{test_result}</a></p>""")
|
||||||
await list.close_session()
|
await list.close_session()
|
||||||
|
@ -172,7 +172,7 @@ class TestTmdbMethods(unittest.IsolatedAsyncioTestCase):
|
||||||
await list.load_parameters()
|
await list.load_parameters()
|
||||||
await list.query()
|
await list.query()
|
||||||
test_result = results['results'][-1]['title']
|
test_result = results['results'][-1]['title']
|
||||||
tested = await list.getListText()
|
tested = list.getListText()
|
||||||
tested = tested[(len(results['results'][-1]['title'])) * -1:]
|
tested = tested[(len(results['results'][-1]['title'])) * -1:]
|
||||||
self.assertEqual(tested, test_result)
|
self.assertEqual(tested, test_result)
|
||||||
await list.close_session()
|
await list.close_session()
|
||||||
|
|
Loading…
Reference in a new issue