From: Shane Jaroch Date: Fri, 19 Apr 2024 16:13:39 +0000 (-0400) Subject: cosmetic X-Git-Tag: v0.2.8.dev2~25 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=78296221203bbf068abf4b31a88c3d5a9f957648;p=nutratech%2Fcli.git cosmetic --- diff --git a/ntclient/models/__init__.py b/ntclient/models/__init__.py index bea2910..d7d7cff 100644 --- a/ntclient/models/__init__.py +++ b/ntclient/models/__init__.py @@ -49,7 +49,7 @@ class Recipe: # Validate data uuids = {x["recipe_id"] for x in self.rows} if len(uuids) != 1: - print("Found %s keys: %s" % (len(uuids), uuids)) + print("ERROR: Found %s keys: %s" % (len(uuids), uuids)) raise KeyError("FATAL: must have exactly 1 uuid per recipe CSV file!") self.uuid = list(uuids)[0] diff --git a/tests/services/test_recipe.py b/tests/services/test_recipe.py index c6c2cc3..a1bf7fe 100644 --- a/tests/services/test_recipe.py +++ b/tests/services/test_recipe.py @@ -33,10 +33,9 @@ class TestRecipe(unittest.TestCase): exit_code, _ = r.recipes_overview() assert exit_code == 0 - # @unittest.skip("Not implemented") def test_recipe_process_data_multiple_recipe_uuids_throws_key_error(self): """Raises key error if recipe uuids are not unique""" - # TODO: return_value should be a list of recipe dicts, each with a 'uuid' key + # TODO: this should be a custom exception, i.e. RecipeValidationException with patch( "ntclient.models.Recipe._aggregate_rows", return_value=[{"recipe_id": "UUID_1"}, {"recipe_id": "UUID_2"}],