Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Jan 2, 2024
1 parent 24f8af5 commit 13b987c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
local = os.environ["LOCAL"] == "True"
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"

if py_version in ["3.10", "3.11", "3.12"]:
time.sleep(300)

movie_ids = {
"3.6": {"id": 11, "name": "Star Wars"},
"3.7": {"id": 1891, "name": "The Empire Strikes Back"},
Expand Down Expand Up @@ -101,7 +104,9 @@ def test_aa_session(self):
v4_url = self.api_v4_session.v4_authenticate()
if local:
print(f"\n\nApprove URL: {v4_url}")
time.sleep(30)
with open("url.txt", "w") as file1:
file1.write(v4_url)
time.sleep(120)
else:
git = Github(gh_token)
repo = git.get_user("meisnate12").get_repo("TMDbAPIs")
Expand Down Expand Up @@ -229,6 +234,7 @@ def test_discover(self):
movies.get_results(-1)
self.assertEqual(len(movies.get_results(50)), 50)
self.assertGreater(len(movies.get_results()), 50)
movies.load_page(1)
self.assertIsNotNone([m for m in movies])
self.assertIsNotNone(movies[1])
tv_shows = self.api.discover_tv_shows(with_companies=1)
Expand Down

0 comments on commit 13b987c

Please sign in to comment.