Remove nested comprehension in tests