Use shared make() helper
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 tests.conftest import get_trakt_api
-
-
-def make(cls=None, **kwargs):
- cls = cls if cls is not None else "object"
- # https://stackoverflow.com/a/2827726/2314626
- return type(cls, (object,), kwargs)
-
+from tests.conftest import get_trakt_api, make
trakt = get_trakt_api()

MODIFY
tests/test_tv_lookup.py
tests/test_tv_lookup.py
#!/usr/bin/env python3 -m pytest
-from typing import Union
-
-from trakt.tv import TVShow
-
from plex_trakt_sync.plex_api import PlexLibraryItem
-from tests.conftest import get_trakt_api
-
-
-def make(cls=None, **kwargs) -> Union[TVShow]:
- cls = cls if cls is not None else "object"
- # https://stackoverflow.com/a/2827726/2314626
- return type(cls, (object,), kwargs)
-
+from tests.conftest import get_trakt_api, make
trakt = get_trakt_api()

Use shared make() helper