From 329ff13fc03e5c69693b0fde6fd7137f7a20cb44 Mon Sep 17 00:00:00 2001 From: rfitzger Date: Tue, 10 Dec 2024 15:51:37 -0700 Subject: [PATCH] use .get to avoid eager failure --- python/tests/test_downtown_denver_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tests/test_downtown_denver_example.py b/python/tests/test_downtown_denver_example.py index df9a8a5b..bc17022d 100644 --- a/python/tests/test_downtown_denver_example.py +++ b/python/tests/test_downtown_denver_example.py @@ -21,10 +21,10 @@ def test_downtown_denver_example(self) -> None: "model_name": "2016_TOYOTA_Camry_4cyl_2WD", "weights": {"distance": 1, "time": 1, "energy_liquid": 1}, } - + result = app.run(query) self.assertTrue( "error" not in result, - msg=f"error in downtown denver test: {result['error']}", + msg=f"error in downtown denver test: {result.get('error')}", )