self.food_data = {} # type: ignore
- def aggregate_rows(self) -> tuple:
+ def _aggregate_rows(self) -> tuple:
"""Aggregate rows into a tuple"""
print("Processing recipe file: %s" % self.file_path)
with open(self.file_path, "r", encoding="utf-8") as _file:
"""
# Read into memory
- self.rows = self.aggregate_rows()
+ self.rows = self._aggregate_rows()
# Validate data
uuids = {x["recipe_id"] for x in self.rows}
"""Raises key error if recipe uuids are not unique"""
# TODO: return_value should be a list of recipe dicts, each with a 'uuid' key
with patch(
- "ntclient.models.Recipe.aggregate_rows",
+ "ntclient.models.Recipe._aggregate_rows",
return_value=[{"recipe_id": "UUID_1"}, {"recipe_id": "UUID_2"}],
):
with pytest.raises(KeyError):