[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225)

Actually just one fix on the 2.7 branch.

Contributed by Bradley Laney.

(cherry picked from commit 6b490b5db40fc29588e8e6cc23bb89c4fed74ad5)
1 file changed