diff --git a/azext_edge/tests/edge/support/test_support_unit.py b/azext_edge/tests/edge/support/test_support_unit.py index c727d0d28..4a61da002 100644 --- a/azext_edge/tests/edge/support/test_support_unit.py +++ b/azext_edge/tests/edge/support/test_support_unit.py @@ -662,9 +662,8 @@ def assert_list_pods( "namespace: namespace\ntimestamp: '0000-00-00T00:00:00Z'\n", ) - if "prefix_names" in kwargs: - if pod_name not in kwargs["prefix_names"]: - continue + if pod_name not in kwargs.get("prefix_names", []): + continue for container_name in pods_with_container[namespace][pod_name]: data = (