def test_nonce(self, size=16): nonce_values = set(oauth.nonce(size) for _ in range(size)) # uniqueness self.assertEqual(len(nonce_values), size) # length for nonce in nonce_values: self.assertEqual(len(nonce), size)