tests: added tests for daq_server, error_codes, exception_handler and tell_client

This commit is contained in:
2026-04-24 10:48:09 +02:00
parent e5ffbb9b18
commit c233bd333d
4 changed files with 211 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from aare.common.error_codes import AuthErrorCode, DAQErrorCode, error_code_help, export_error_codes
def test_error_code_help_returns_string():
help_text = error_code_help(AuthErrorCode.AUTHENTICATION_FAILED)
assert isinstance(help_text, str)
assert len(help_text) > 0
def test_error_code_help_unknown_code():
help_text = error_code_help("UNKNOWN_CODE")
assert help_text is None
def test_export_error_codes_contains_known_codes():
exported = export_error_codes()
assert AuthErrorCode.AUTHENTICATION_FAILED.name in exported