From d747c73f45e160dee26ea0377b7dffdb69ff2f19 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Mon, 2 Dec 2024 16:58:05 +0000 Subject: [PATCH] Address some review comments #413 --- inventory_management_system_api/schemas/setting.py | 3 +-- test/unit/repositories/test_usage_status.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inventory_management_system_api/schemas/setting.py b/inventory_management_system_api/schemas/setting.py index 5c181f98..c8b5bac5 100644 --- a/inventory_management_system_api/schemas/setting.py +++ b/inventory_management_system_api/schemas/setting.py @@ -43,7 +43,6 @@ def validate_usage_statuses( Ensures the `usage_statuses` dont contain any duplicate IDs. :param usage_statuses: The value of the `usage_statuses` field. - :param info: Validation info from pydantic. :return: The value of the `usage_statuses` field. """ @@ -57,7 +56,7 @@ def validate_usage_statuses( return usage_statuses -class SparesDefinitionSchema(SparesDefinitionPutSchema): +class SparesDefinitionSchema(BaseModel): """ Schema model for a spares definition. """ diff --git a/test/unit/repositories/test_usage_status.py b/test/unit/repositories/test_usage_status.py index 09425ed2..a5ea4d35 100644 --- a/test/unit/repositories/test_usage_status.py +++ b/test/unit/repositories/test_usage_status.py @@ -332,7 +332,7 @@ def mock_delete( :param deleted_count: Number of documents deleted successfully. :param item_data: Dictionary containing an item's data (or `None`). - :param setting_data: Dictionary containing an settings's data (or `None`). + :param setting_data: Dictionary containing a settings's data (or `None`). """ self.mock_is_usage_status_in_item(item_data) self.mock_is_usage_status_in_setting(setting_data) @@ -400,7 +400,7 @@ def mock_is_usage_status_in_setting(self, setting_data: Optional[dict] = None) - Mocks database methods appropriately for when the `_is_usage_status_in_setting` repo method will be called. - :param setting_data: Dictionary containing an settings's data (or `None`). + :param setting_data: Dictionary containing a settings's data (or `None`). """ self._mock_setting_data = setting_data RepositoryTestHelpers.mock_find_one(self.settings_collection, setting_data)