]> Nutra Git (v1) - nutratech/cli.git/commitdiff
cosmetic
authorShane Jaroch <chown_tee@proton.me>
Fri, 19 Apr 2024 16:13:39 +0000 (12:13 -0400)
committerShane Jaroch <chown_tee@proton.me>
Fri, 19 Apr 2024 16:13:39 +0000 (12:13 -0400)
ntclient/models/__init__.py
tests/services/test_recipe.py

index bea2910da3ae121dc20799f53e54a900b44c8ddb..d7d7cfff1871cfc97822176c37532ec475a1dcd3 100644 (file)
@@ -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]
 
index c6c2cc3b850c29860280dac783e41da27245b5c9..a1bf7feb22c160dc703e2f1d255d6491d0faaa17 100644 (file)
@@ -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"}],