Minor optimization in test_fail_safe()
Minor optimization in test_fail_safe()

The code is now shorter and better readable.

hughsie/libhif,rpm-software-management/libdnf,rpm-software-management/libhif,rpm-software-management/libhif,rpm-software-management/libdnf,rpm-software-management/libdnf,hughsie/libhif,hughsie/libhif,rpm-software-management/libhif,hughsie/libhif,rpm-software-management/libdnf,rpm-software-management/libhif