From 11b7a04c6bd0e1d5eb53b1e2580c152f570a942b Mon Sep 17 00:00:00 2001 From: Paulina Kujawa Date: Wed, 30 Oct 2024 15:57:25 +0100 Subject: [PATCH] add tests --- src/hct_mis_api/api/pagination.py | 2 ++ tests/unit/api/test_pagination_classes.py | 0 2 files changed, 2 insertions(+) create mode 100644 tests/unit/api/test_pagination_classes.py diff --git a/src/hct_mis_api/api/pagination.py b/src/hct_mis_api/api/pagination.py index c184b14837..45465c073a 100644 --- a/src/hct_mis_api/api/pagination.py +++ b/src/hct_mis_api/api/pagination.py @@ -14,4 +14,6 @@ def get_paginated_response(self, data: dict) -> Response: def get_paginated_response_schema(self, schema: Any) -> dict: response_schema = super().get_paginated_response_schema(schema) del response_schema["properties"]["count"] + if "required" in response_schema: + response_schema["required"].remove("count") return response_schema diff --git a/tests/unit/api/test_pagination_classes.py b/tests/unit/api/test_pagination_classes.py new file mode 100644 index 0000000000..e69de29bb2