Update tests to not use generators