Skip to content

Commit 04a66d0

Browse files
authored
Merge pull request #4 from laniakea2006/contribs/print
fix(print): add the unit tests for telemetry for print module
2 parents 647dc15 + 89a6fdd commit 04a66d0

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

tests/core/unit/telemetry/test_module.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def test_module_values(self):
1717
assert Module.DESTINATION.value == "destination"
1818
assert Module.OBJECTSTORE.value == "objectstore"
1919
assert Module.DMS.value == "dms"
20+
assert Module.PRINT.value == "print"
2021

2122
def test_module_str_representation(self):
2223
"""Test that Module enum converts to string correctly."""
@@ -27,6 +28,7 @@ def test_module_str_representation(self):
2728
assert str(Module.DESTINATION) == "destination"
2829
assert str(Module.OBJECTSTORE) == "objectstore"
2930
assert str(Module.DMS) == "dms"
31+
assert str(Module.PRINT) == "print"
3032

3133
def test_module_is_string_enum(self):
3234
"""Test that Module enum inherits from str."""
@@ -53,7 +55,7 @@ def test_module_in_collection(self):
5355
def test_all_modules_present(self):
5456
"""Test that all expected modules are present."""
5557
all_modules = list(Module)
56-
assert len(all_modules) == 11
58+
assert len(all_modules) == 12
5759
assert Module.AICORE in all_modules
5860
assert Module.AUDITLOG in all_modules
5961
assert Module.AUDITLOG_NG in all_modules
@@ -63,6 +65,7 @@ def test_all_modules_present(self):
6365
assert Module.OBJECTSTORE in all_modules
6466
assert Module.DMS in all_modules
6567
assert Module.AGENT_MEMORY in all_modules
68+
assert Module.PRINT in all_modules
6669

6770
def test_module_iteration(self):
6871
"""Test iterating over Module enum."""
@@ -75,3 +78,4 @@ def test_module_iteration(self):
7578
assert "objectstore" in module_values
7679
assert "dms" in module_values
7780
assert "extensibility" in module_values
81+
assert "print" in module_values

tests/core/unit/telemetry/test_operation.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ def test_dms_operations(self):
150150
assert Operation.DMS_APPEND_CONTENT_STREAM.value == "cmis_append_content_stream"
151151
assert Operation.DMS_CMIS_QUERY.value == "cmis_query"
152152

153+
def test_print_operations(self):
154+
"""Test Print operation values."""
155+
assert Operation.PRINT_CREATE_CLIENT.value == "create_client"
156+
assert Operation.PRINT_LIST_QUEUES.value == "list_queues"
157+
assert Operation.PRINT_CREATE_QUEUE.value == "create_queue"
158+
assert Operation.PRINT_GET_PROFILES.value == "get_print_profiles"
159+
assert Operation.PRINT_UPLOAD_DOCUMENT.value == "upload_document"
160+
assert Operation.PRINT_CREATE_TASK.value == "create_print_task"
161+
153162
def test_operation_str_representation(self):
154163
"""Test that Operation enum converts to string correctly."""
155164
assert str(Operation.AUDITLOG_LOG) == "log"
@@ -196,10 +205,11 @@ def test_operation_iteration(self):
196205
assert any("FRAGMENT" in op.name for op in all_operations)
197206
assert any("OBJECTSTORE" in op.name for op in all_operations)
198207
assert any("AICORE" in op.name for op in all_operations)
208+
assert any("PRINT" in op.name for op in all_operations)
199209

200210
def test_operation_count(self):
201211
"""Test that we have the expected number of operations."""
202212
all_operations = list(Operation)
203213
# 3 auditlog + 11 destination + 10 certificate + 10 fragment + 8 objectstore
204-
# + 2 extensibility + 2 aicore + 23 dms + 4 agentgateway + 13 agent_memory + 5 data anonymization = 89
205-
assert len(all_operations) == 91
214+
# + 2 extensibility + 2 aicore + 23 dms + 4 agentgateway + 13 agent_memory + 5 data anonymization + 6 print = 97
215+
assert len(all_operations) == 96

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)