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

Method test_short_alphabet

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

Source from the content-addressed store, hash-verified

47 assert h.encode(99, 25) == 'AYyIB'
48
49 def test_short_alphabet(self):
50 h = Hashids(alphabet='ABcfhistuCFHISTU')
51 assert h.encode(2839, 12, 32, 5) == 'AABAABBBABAAAuBBAAUABBBBBCBAB'
52 assert h.encode(1, 2, 3) == 'AAhBAiAA'
53 assert h.encode(23832) == 'AABAAABABBBAABBB'
54 assert h.encode(99, 25) == 'AAABBBAAHBBAAB'
55
56 def test_min_length(self):
57 h = Hashids(min_length=25)

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.95
HashidsClass · 0.90

Tested by

no test coverage detected