def test_consistency(self): for i in xrange(0, 5000): self.assertEqual(shortener.decode64(shortener.encode64(i)), i)
def test_decoder(self): self.assertEqual(shortener.decode64('.'), 0) self.assertEqual(shortener.decode64('emad'), 1364036)
def test_decoder(self): self.assertEqual(shortener.decode64('.'), 0) self.assertEqual(shortener.decode64('emad'), 1364036)
def test_consistency(self): for i in xrange(0, 5000): self.assertEqual(shortener.decode64(shortener.encode64(i)), i)
def lengthen(value): return shortener.decode64(value)