def test_result_is_string(self):
     self.assertTrue(is_bytes(generate_client_secret()))
 def test_range(self):
     for i in range(100):
         n_bits = 144
         value = bytes_to_integer(base64_decode(generate_client_secret(144)))
         self.assertTrue(value >= 0 and value < (1 << n_bits)) # 2**n_bits
 def test_uniqueness(self):
     self.assertNotEqual(generate_client_secret(), generate_client_secret())