def METHOD_NAME(self):
    # Test token_bytes.
    for n in (1, 8, 17, 100):
        with self.subTest(n=n):
            self.assertIsInstance(secrets.token_bytes(n), bytes)
            self.assertEqual(len(secrets.token_bytes(n)), n)