fix: unit tests fixes and ruff formating

N25B-205
This commit is contained in:
Björn Otgaar
2025-10-28 11:31:05 +01:00
parent 52faa59184
commit 47a87d0b4a
11 changed files with 307 additions and 209 deletions

View File

@@ -2,12 +2,15 @@ import pytest
from control_backend.schemas.ri_message import RIMessage, RIEndpoint, SpeechCommand
from pydantic import ValidationError
def valid_command_1():
return SpeechCommand(data="Hallo?")
def invalid_command_1():
return RIMessage(endpoint=RIEndpoint.PING, data="Hello again.")
def test_valid_speech_command_1():
command = valid_command_1()
try:
@@ -16,7 +19,7 @@ def test_valid_speech_command_1():
assert True
except ValidationError:
assert False
def test_invalid_speech_command_1():
command = invalid_command_1()
@@ -31,5 +34,3 @@ def test_invalid_speech_command_1():
assert False
except ValidationError:
assert passed_ri_message_validation