bpo-40121: Fix exception type in test (GH-19267)

1 file changed