Add type hints to integration tests (j-m) (#87704)
This commit is contained in:
parent
630028106a
commit
f75ac17554
103 changed files with 605 additions and 417 deletions
|
@ -2,15 +2,17 @@
|
|||
from unittest.mock import patch
|
||||
|
||||
from pykrakenapi.pykrakenapi import CallRateLimitError, KrakenAPIError
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.kraken.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .const import TICKER_INFORMATION_RESPONSE, TRADEABLE_ASSET_PAIR_RESPONSE
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
async def test_unload_entry(hass):
|
||||
async def test_unload_entry(hass: HomeAssistant) -> None:
|
||||
"""Test unload for Kraken."""
|
||||
with patch(
|
||||
"pykrakenapi.KrakenAPI.get_tradable_asset_pairs",
|
||||
|
@ -28,7 +30,9 @@ async def test_unload_entry(hass):
|
|||
assert DOMAIN not in hass.data
|
||||
|
||||
|
||||
async def test_unknown_error(hass, caplog):
|
||||
async def test_unknown_error(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test unload for Kraken."""
|
||||
with patch(
|
||||
"pykrakenapi.KrakenAPI.get_tradable_asset_pairs",
|
||||
|
@ -45,7 +49,9 @@ async def test_unknown_error(hass, caplog):
|
|||
assert "Unable to fetch data from Kraken.com:" in caplog.text
|
||||
|
||||
|
||||
async def test_callrate_limit(hass, caplog):
|
||||
async def test_callrate_limit(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test unload for Kraken."""
|
||||
with patch(
|
||||
"pykrakenapi.KrakenAPI.get_tradable_asset_pairs",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue