From 6a191f822f2e759c2aad07b8f9eacbedcb039827 Mon Sep 17 00:00:00 2001 From: lxning <23464292+lxning@users.noreply.github.com> Date: Wed, 23 Mar 2022 09:31:04 -0700 Subject: [PATCH] fix snapsht test for default manifest case (#1524) * fix snapsht test for default manifest case * unregister desnet161 --- test/pytest/test_snapshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/pytest/test_snapshot.py b/test/pytest/test_snapshot.py index 91918cce99..ff896daaf8 100644 --- a/test/pytest/test_snapshot.py +++ b/test/pytest/test_snapshot.py @@ -199,12 +199,14 @@ def test_replace_mar_file_with_dummy(): response = requests.get('http://127.0.0.1:8081/models/') assert json.loads(response.content)['models'][0]['modelName'] == "densenet161" except: - assert True, "Correct Model mar file not found" + assert False, "Default manifest does not work" else: - assert False, "Something is not right!! Successfully started Torchserve with a dummy mar file" + assert True, "Successfully started Torchserve with a dummy mar file (ie. default manifest)" finally: + test_utils.unregister_model("densenet161") test_utils.delete_all_snapshots() test_utils.delete_model_store() + test_utils.stop_torchserve() def test_restart_torchserve_with_one_of_model_mar_removed():