Skip to content

Commit

Permalink
Apply changes from manufacturers to service tests for consistency #308
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Jul 8, 2024
1 parent 66c0248 commit 361b7a8
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 188 deletions.
14 changes: 7 additions & 7 deletions test/unit/repositories/test_catalogue_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def mock_create(
"""Mocks database methods appropriately to test the `create` repo method.
:param catalogue_category_in_data: Dictionary containing the catalogue category data as would be required for
a `CatalogueCategoryIn` database model (i.e. no id or created and modified
a `CatalogueCategoryIn` database model (i.e. no ID or created and modified
times required).
:param parent_catalogue_category_in_data: Either `None` or a dictionary containing the parent catalogue category
data as would be required for a `CatalogueCategoryIn` database model.
Expand Down Expand Up @@ -237,7 +237,7 @@ def check_create_failed_with_exception(self, message: str) -> None:
Checks that a prior call to `call_create_expecting_error` worked as expected, raising an exception
with the correct message.
:param message: Expected essage of the raised exception.
:param message: Expected message of the raised exception.
"""

self.catalogue_categories_collection.insert_one.assert_not_called()
Expand Down Expand Up @@ -442,7 +442,7 @@ def call_get_breadcrumbs(self, catalogue_category_id: str) -> None:
"""
Calls the `CatalogueCategoryRepo` `get_breadcrumbs` method.
:param system_id: ID of the system to obtain the breadcrumbs of.
:param catalogue_category_id: ID of the catalogue category to obtain the breadcrumbs of.
"""

self._obtained_catalogue_category_id = catalogue_category_id
Expand Down Expand Up @@ -594,8 +594,8 @@ def set_update_data(self, new_catalogue_category_in_data: dict):
Assigns the update data to use during a call to `call_update`.
:param new_catalogue_category_in_data: New catalogue category data as would be required for a
`CatalogueCategoryIn` database model to supply to the `SystemRepo`
`update` method
`CatalogueCategoryIn` database model to supply to the `CatalogueCategoryRepo`
`update` method
"""
self._catalogue_category_in = CatalogueCategoryIn(**new_catalogue_category_in_data)

Expand All @@ -614,7 +614,7 @@ def mock_update(
:param catalogue_category_id: ID of the catalogue category that will be updated.
:param new_catalogue_category_in_data: Dictionary containing the new catalogue category data as would be
required for a `CatalogueCategoryIn` database model (i.e. no id or
required for a `CatalogueCategoryIn` database model (i.e. no ID or
created and modified times required).
:param stored_catalogue_category_in_data: Dictionary containing the catalogue category data for the existing
stored catalogue category as would be required for a
Expand Down Expand Up @@ -1016,7 +1016,7 @@ def call_delete(self, catalogue_category_id: str) -> None:
"""
Calls the `CatalogueCategoryRepo` `delete` method.
:param system_id: ID of the system to be deleted.
:param catalogue_category_id: ID of the catalogue category to be deleted.
"""

self._delete_catalogue_category_id = catalogue_category_id
Expand Down
4 changes: 2 additions & 2 deletions test/unit/repositories/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def mock_create(
Mocks database methods appropriately to test the `create` repo method.
:param system_in_data: Dictionary containing the system data as would be required for a `SystemIn` database
model (i.e. no id or created and modified times required).
model (i.e. no ID or created and modified times required).
:param parent_system_in_data: Either `None` or a dictionary containing the parent system data as would be
required for a `SystemIn` database model.
:param duplicate_system_in_data: Either `None` or a dictionary containing system data for a duplicate system.
Expand Down Expand Up @@ -548,7 +548,7 @@ def mock_update(
:param system_id: ID of the system to be updated
:param new_system_in_data: Dictionary containing the new system data as would be required for a SystemIn
database model (i.e. no id or created and modified times required)
database model (i.e. no ID or created and modified times required)
:param stored_system_in_data: Dictionary containing the system data for the existing stored system
as would be required for a `SystemIn` database model
:param new_parent_system_in_data: Either `None` or a dictionary containing the new parent system data as would
Expand Down
Loading

0 comments on commit 361b7a8

Please sign in to comment.