fix: unit tests fixes and ruff formating
N25B-205
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user