MCPcopy Create free account
hub / github.com/davidaurelio/hashids-python / test_alphabet

Method test_alphabet

test/test_hashids.py:42–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 assert h.encode(99, 25) == 'JOMh1'
41
42 def test_alphabet(self):
43 h = Hashids(alphabet='!"#%&\',-/0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~&#x27;)
44 assert h.encode(2839, 12, 32, 5) == '_nJUNTVU3'
45 assert h.encode(1, 2, 3) == '7xfYh2'
46 assert h.encode(23832) == 'Z6R>'
47 assert h.encode(99, 25) == 'AYyIB'
48
49 def test_short_alphabet(self):
50 h = Hashids(alphabet='ABcfhistuCFHISTU')

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.95
HashidsClass · 0.90

Tested by

no test coverage detected