Skip to content

Commit

Permalink
Merge branch 'refactor-item-service-unit-tests-#346' into refactor-it…
Browse files Browse the repository at this point in the history
…em-e2e-tests-#347
  • Loading branch information
joelvdavies committed Sep 4, 2024
2 parents 59c7a79 + 67183cf commit 99fae45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/test_catalogue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# pylint: disable=duplicate-code
# pylint: disable=too-many-public-methods

import copy
from test.e2e.conftest import E2ETestHelpers
from test.e2e.mock_schemas import SYSTEM_POST_A, USAGE_STATUS_POST_A
from test.e2e.test_catalogue_category import CreateDSL as CatalogueCategoryCreateDSL
Expand Down Expand Up @@ -143,7 +144,7 @@ def post_catalogue_item(self, catalogue_item_data: dict) -> Optional[str]:
"""

# Replace any unit values with unit IDs
full_catalogue_item_data = catalogue_item_data.copy()
full_catalogue_item_data = copy.deepcopy(catalogue_item_data)
full_catalogue_item_data = E2ETestHelpers.replace_unit_values_with_ids_in_properties(
full_catalogue_item_data, self.unit_value_id_dict
)
Expand All @@ -167,8 +168,8 @@ def post_catalogue_item(self, catalogue_item_data: dict) -> Optional[str]:

def post_catalogue_item_and_prerequisites_no_properties(self, catalogue_item_data: dict) -> Optional[str]:
"""
Utility method that posts a catalogue item with the given data and also its prerequisite manufacturer and
catalogue category. Uses CATALOGUE_CATEGORY_POST_DATA_LEAF_NO_PARENT_NO_PROPERTIES for the catalogue
Utility method that posts a catalogue item with the given data and also its prerequisite manufacturer,
catalogue category and units. Uses `CATALOGUE_CATEGORY_POST_DATA_LEAF_NO_PARENT_NO_PROPERTIES` for the catalogue
category.
:param catalogue_item_data: Dictionary containing the basic catalogue item data as would be required for a
Expand Down

0 comments on commit 99fae45

Please sign in to comment.