Skip to content

Commit

Permalink
change test scenario :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsr21 committed May 6, 2024
1 parent 1ec5c81 commit 4d55ac2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions movie-backend/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def test_get_popular_tv_show(self):

def test_get_movie_details(self):
"""Test get_movie_details()"""
response = self.app.get('/movie/12')
response = self.app.get('/movie/559969')
self.assertEqual(response.status_code, 200)
self.assertIn('Finding Nemo', response.json['title'])
self.assertIn('El Camino: A Breaking Bad Movie', response.json['title'])

def test_get_tv_details(self):
"""Test get_tv_details()"""
Expand All @@ -34,7 +34,7 @@ def test_get_tv_details(self):

def test_search_movies(self):
"""Test search_movies()"""
response = self.app.get('/search/movie?query=finding nemo')
response = self.app.get('/search/movie?query=el camino')
self.assertEqual(response.status_code, 200)
self.assertIn('total_results', response.json)

Expand All @@ -46,15 +46,15 @@ def test_search_tv_shows(self):

def test_rate_movie_success(self):
"""Test rate_movie()"""
response = self.app.post('/movie/12/rate', json={
response = self.app.post('/movie/559969/rate', json={
"value" : 10
})
self.assertEqual(response.status_code, 200)
self.assertTrue(response.json['success'])

def test_rate_movie_fail(self):
"""Test rate_movie()"""
response = self.app.post('/movie/12/rate', json={
response = self.app.post('/movie/559969/rate', json={
"foo" : "bar"
})
self.assertEqual(response.status_code, 400)
Expand Down

0 comments on commit 4d55ac2

Please sign in to comment.