diff --git a/tests/recipe/test_recipe.py b/tests/recipe/test_recipe.py index c27eb8f..b73aad3 100644 --- a/tests/recipe/test_recipe.py +++ b/tests/recipe/test_recipe.py @@ -363,8 +363,6 @@ def test_merging_recipes(): # There is a 'C service' assert any( - map( - lambda x: (isinstance(x, dict) and x.get("service") == "C service"), - C.recipe.values(), - ) + isinstance(x, dict) and x.get("service") == "C service" + for x in C.recipe.values() ) diff --git a/tests/transport/test_common.py b/tests/transport/test_common.py index c30710c..2ac337c 100644 --- a/tests/transport/test_common.py +++ b/tests/transport/test_common.py @@ -167,7 +167,9 @@ def test_callbacks_can_be_intercepted(mangling): ) # Pass through (tests the value passed to the interceptor function is sensible) - intercept = lambda x: x + def intercept(x): + return x + ct.subscription_callback_set_intercept(intercept) ct.subscription_callback(subid)(mock.sentinel.header, mock.sentinel.message)