Fix tests to use test generators