Use get_trakt_api helper
MODIFY
tests/test_batch.py
tests/test_batch.py
#!/usr/bin/env python3 -m pytest
-from plex_trakt_sync.trakt_api import TraktApi, TraktBatch
-from tests.conftest import load_mock
+from plex_trakt_sync.trakt_api import TraktBatch
+from tests.conftest import load_mock, get_trakt_api
from unittest.mock import Mock
-trakt = TraktApi()
+trakt = get_trakt_api()
def test_batch_size_none():

MODIFY
tests/test_new_agent.py
tests/test_new_agent.py
#!/usr/bin/env python3 -m pytest
from plex_trakt_sync.plex_api import PlexLibraryItem
-from plex_trakt_sync.trakt_api import TraktApi
+from tests.conftest import get_trakt_api
def make(cls=None, **kwargs):
@@ -9,7 +9,7 @@ def make(cls=None, **kwargs):
return type(cls, (object,), kwargs)
-trakt = TraktApi()
+trakt = get_trakt_api()
def test_tv_lookup():

MODIFY
tests/test_tv_lookup.py
tests/test_tv_lookup.py
from trakt.tv import TVShow
from plex_trakt_sync.plex_api import PlexLibraryItem
-from plex_trakt_sync.trakt_api import TraktApi
+from tests.conftest import get_trakt_api
def make(cls=None, **kwargs) -> Union[TVShow]:
@@ -13,7 +13,7 @@ def make(cls=None, **kwargs) -> Union[TVShow]:
return type(cls, (object,), kwargs)
-trakt = TraktApi()
+trakt = get_trakt_api()
def test_tv_lookup():

Use get_trakt_api helper