bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)

Contributed by Bradley Laney.
2 files changed