Skip to content

Commit

Permalink
fix yt_oauth fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Dec 17, 2024
1 parent e971560 commit 282ac9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest

from ytmusicapi import YTMusic
from ytmusicapi.auth.oauth import OAuthCredentials


def get_resource(file: str) -> str:
Expand Down Expand Up @@ -56,8 +57,9 @@ def fixture_yt_auth(browser_filepath) -> YTMusic:


@pytest.fixture(name="yt_oauth")
def fixture_yt_oauth(oauth_filepath) -> YTMusic:
return YTMusic(oauth_filepath)
def fixture_yt_oauth(oauth_filepath, config) -> YTMusic:
credentials = OAuthCredentials(client_id=config["auth"]["client_id"], client_secret=config["auth"]["client_secret"])
return YTMusic(oauth_filepath, oauth_credentials=credentials)


@pytest.fixture(name="yt_brand")
Expand Down

0 comments on commit 282ac9d

Please sign in to comment.