Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tests/components/youtube/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Configure tests for the Google Mail integration."""
"""Configure tests for the YouTube integration."""
from collections.abc import Awaitable, Callable, Coroutine
import time
from typing import Any
Expand All @@ -20,15 +20,13 @@

ComponentSetup = Callable[[], Awaitable[None]]

BUILD = "homeassistant.components.google_mail.api.build"
CLIENT_ID = "1234"
CLIENT_SECRET = "5678"
GOOGLE_AUTH_URI = "https://accounts.google.com/o/oauth2/v2/auth"
GOOGLE_TOKEN_URI = "https://oauth2.googleapis.com/token"
SCOPES = [
"https://www.googleapis.com/auth/youtube.readonly",
]
SENSOR = "sensor.example_gmail_com_vacation_end_date"
TITLE = "Google for Developers"
TOKEN = "homeassistant.components.youtube.api.config_entry_oauth2_flow.OAuth2Session.async_ensure_token_valid"

Expand Down Expand Up @@ -59,7 +57,7 @@ def mock_expires_at() -> int:

@pytest.fixture(name="config_entry")
def mock_config_entry(expires_at: int, scopes: list[str]) -> MockConfigEntry:
"""Create Google Mail entry in Home Assistant."""
"""Create YouTube entry in Home Assistant."""
return MockConfigEntry(
domain=DOMAIN,
title=TITLE,
Expand All @@ -79,7 +77,7 @@ def mock_config_entry(expires_at: int, scopes: list[str]) -> MockConfigEntry:

@pytest.fixture(autouse=True)
def mock_connection(aioclient_mock: AiohttpClientMocker) -> None:
"""Mock Google Mail connection."""
"""Mock YouTube connection."""
aioclient_mock.post(
GOOGLE_TOKEN_URI,
json={
Expand Down