Add API scope checks to Teslemetry (#113640)
This commit is contained in:
parent
a33aacfcaa
commit
f249a9ba4b
7 changed files with 99 additions and 8 deletions
|
@ -7,7 +7,23 @@ from unittest.mock import patch
|
|||
|
||||
import pytest
|
||||
|
||||
from .const import LIVE_STATUS, PRODUCTS, RESPONSE_OK, VEHICLE_DATA, WAKE_UP_ONLINE
|
||||
from .const import (
|
||||
LIVE_STATUS,
|
||||
METADATA,
|
||||
PRODUCTS,
|
||||
RESPONSE_OK,
|
||||
VEHICLE_DATA,
|
||||
WAKE_UP_ONLINE,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_metadata():
|
||||
"""Mock Tesla Fleet Api metadata method."""
|
||||
with patch(
|
||||
"homeassistant.components.teslemetry.Teslemetry.metadata", return_value=METADATA
|
||||
) as mock_products:
|
||||
yield mock_products
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue