bpo-40286: Use random.randbytes() in tests (GH-19575)

5 files changed