def testFailToEncodeZero(self): with self.assertRaises(AssertionError): util.int_to_base64(0)
def testEncodeDecodePositiveNonZeroInt(self): for a in range(1, 1000000, 100): self.assertEqual(a, util.base64_to_int(util.int_to_base64(a)))