Пример #1
0
	def test_backAndForth(self):
		nb = 23456
		b64 = encodeB64Padless(nb)
		nb2 = decodeB64Padless(b64)
		self.assertEqual(nb, nb2)
		
		nb = 0
		b64 = encodeB64Padless(nb)
		nb2 = decodeB64Padless(b64)
		self.assertEqual(nb, nb2)
		
		nb = 12452512512412465125125124
		b64 = encodeB64Padless(nb)
		nb2 = decodeB64Padless(b64)
		self.assertEqual(nb, nb2)
		
		nb = 1234
		b64 = encodeB64Padless(nb)
		nb2 = decodeB64Padless(b64)
		self.assertEqual(nb, nb2)
Пример #2
0
	def test_equalCharactersAreRemoved(self):
		nb = 3
		b64 = encodeB64Padless(nb)
		self.assertTrue(b64.find("=") == -1)