Skip to content

Commit

Permalink
Update WebSocketClient test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed Mar 6, 2024
1 parent 2edabd5 commit 48db3c8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_websocket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from aiohttp import web
import pytest

from systembridgeconnector.const import TYPE_DIRECTORIES
from systembridgeconnector.const import EVENT_MODULES, TYPE_DATA_GET, TYPE_DIRECTORIES
from systembridgeconnector.exceptions import ConnectionErrorException
from systembridgeconnector.websocket_client import WebSocketClient
from systembridgemodels.const import MODEL_SYSTEM
Expand Down Expand Up @@ -121,7 +121,14 @@ async def test_exit_backend(aiohttp_client: ClientSessionGenerator):
@pytest.mark.asyncio
async def test_get_data(aiohttp_client: ClientSessionGenerator):
"""Test get data."""
websocket_client = await _get_websocket_client(aiohttp_client)
websocket_client = await _get_websocket_client(
aiohttp_client,
Response(
id=REQUEST_ID,
type=TYPE_DATA_GET,
data={EVENT_MODULES: [MODEL_SYSTEM]},
),
)
response = await websocket_client.get_data(
GetData(
modules=[MODEL_SYSTEM],
Expand Down

0 comments on commit 48db3c8

Please sign in to comment.