From 7f790278b62da0b92da93832f59c01831c82d7a1 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 24 Oct 2022 14:27:07 -0400 Subject: [PATCH] fix tests and better error handling --- VERSION | 2 +- tests/test_api.py | 2 +- tmdbapis/api3.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f9cbc01..337a6a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.7 \ No newline at end of file +1.0.8 \ No newline at end of file diff --git a/tests/test_api.py b/tests/test_api.py index 8115778..cadee3b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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): diff --git a/tmdbapis/api3.py b/tmdbapis/api3.py index 4179fe2..4c0a1d5 100644 --- a/tmdbapis/api3.py +++ b/tmdbapis/api3.py @@ -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: