lambda in tests py3 fixed