mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-11 10:37:12 +00:00
Feature: Allow monitoring access to tasks summary (#12624)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
1 parent
2a20cc29a6
commit
0c25c2dac5
14 files changed
+133
-21
No files matched your search
@@ -100,6 +100,14 @@ class TestTasksSummarySchema:
|
||||
"summary items must have 'total_count' (TaskSummarySerializer)"
|
||||
)
|
||||
|
||||
def test_summary_days_parameter_constraints(self, api_schema: SchemaGenerator):
|
||||
op = api_schema["paths"]["/api/tasks/summary/"]["get"]
|
||||
params = {p["name"]: p for p in op.get("parameters", [])}
|
||||
assert "days" in params, "days query parameter must be declared"
|
||||
schema = params["days"]["schema"]
|
||||
assert schema.get("minimum") == 1, "days must have minimum: 1"
|
||||
assert schema.get("maximum") == 365, "days must have maximum: 365"
|
||||
|
||||
|
||||
class TestTasksActiveSchema:
|
||||
"""tasks_active_retrieve: response must be an array of TaskSerializerV10."""
|
||||
|
||||
Reference in new issue
Block a user