Fix test assertions that never compared against the expected value (#161774)

Co-authored-by: Stan Ulbrych <stan@python.org>
12 files changed