Fix two test cases that use side effects in comprehensions
Fix two test cases that use side effects in comprehensions

List comprehensions with side effects considered harmful. Fix two known
instances.

Change-Id: Idfc05de3b42d08b288ff611b5c87c27d837e1301

klmitch/nova,mahak/nova,klmitch/nova,openstack/nova,klmitch/nova,mahak/nova,klmitch/nova,openstack/nova,mahak/nova,openstack/nova