From: Shane Jaroch Date: Fri, 12 Apr 2024 23:16:44 +0000 (-0400) Subject: re-enable & fix recipe (invalid path) test X-Git-Tag: v0.2.8.dev2~32 X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=3674b24ff9f5b8b6c99084b3aa10d8a37ee3cf75;p=nutratech%2Fcli.git re-enable & fix recipe (invalid path) test --- diff --git a/tests/services/test_recipe.py b/tests/services/test_recipe.py index 7b0138f..6813412 100644 --- a/tests/services/test_recipe.py +++ b/tests/services/test_recipe.py @@ -40,14 +40,12 @@ class TestRecipe(unittest.TestCase): with pytest.raises(KeyError): r.recipes_overview() - @unittest.expectedFailure - @pytest.mark.xfail(reason="Due to a wip refactor") - def test_recipe_overview_throws_exc_for_nonexistent_path(self): - """Raises index error if recipe int id is invalid""" + def test_recipe_overview_returns_exit_code_1_for_nonexistent_path(self): + """Returns (1, None) if recipe path is invalid""" # TODO: should we be using guid / uuid instead of integer id? - with pytest.raises(IndexError): - r.recipe_overview("-12345-FAKE-PATH-") + result = r.recipe_overview("-12345-FAKE-PATH-") + assert (1, None) == result def test_recipe_overview_might_succeed_for_maybe_existing_id(self): """Tries 'check for existing ID', but only can if the user initialized"""