Skip to content

Commit

Permalink
fix tests and better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Oct 24, 2022
1 parent 697df1a commit 7f79027
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.7
1.0.8
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_collections(self):

def test_companies(self):
company = self.api.company(1)
self.assertEqual(company.name, "Lucasfilm")
self.assertEqual(company.name, "Lucasfilm Ltd.")
self.assertGreater(len(company.movies), 0)

def test_credit(self):
Expand Down
2 changes: 1 addition & 1 deletion tmdbapis/api3.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _request(self, request_type, path, json=None, **kwargs):
self.response = self._session.get(request_url, params=url_params)
response_json = self.response.json()
except (RequestException, JSONDecodeError) as e:
raise TMDbException(f"Failed to Connect to {base_url}: {e}")
raise TMDbException(f"Failed to Connect to {request_url}: {e}\nParams: {url_params}")
logger.debug(f"Response ({self.response.status_code} [{self.response.reason}]) {response_json}")
if self.response.status_code == 401:
if "status_code" in response_json:
Expand Down

0 comments on commit 7f79027

Please sign in to comment.