mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-30 13:23:21 +01:00
more fixes
This commit is contained in:
parent
14d0a2d8cf
commit
b8551b35d5
@ -2,19 +2,20 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import base64
|
||||
import sys
|
||||
from typing import Any
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from noise.connection import NoiseConnection # type: ignore[import-untyped]
|
||||
import pytest
|
||||
|
||||
from aioesphomeapi import APIConnection
|
||||
from aioesphomeapi._frame_helper import APINoiseFrameHelper, APIPlaintextFrameHelper
|
||||
from aioesphomeapi._frame_helper.noise import ESPHOME_NOISE_BACKEND
|
||||
from aioesphomeapi._frame_helper.plain_text import (
|
||||
_cached_varuint_to_bytes as cached_varuint_to_bytes,
|
||||
_varuint_to_bytes as varuint_to_bytes,
|
||||
)
|
||||
from aioesphomeapi._frame_helper.plain_text import _varuint_to_bytes as varuint_to_bytes
|
||||
from aioesphomeapi.connection import ConnectionState
|
||||
from aioesphomeapi.core import (
|
||||
APIConnectionError,
|
||||
@ -200,6 +201,9 @@ class MockAPINoiseFrameHelper(APINoiseFrameHelper):
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32", reason="Fails on Windows due to pytest internals"
|
||||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_plaintext_frame_helper(
|
||||
in_bytes: bytes, pkt_data: bytes, pkt_type: int
|
||||
|
Loading…
Reference in New Issue
Block a user