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

Method test_salt

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

Source from the content-addressed store, hash-verified

126 assert h.decode('3lKfD') == (99, 25)
127
128 def test_salt(self):
129 h = Hashids(salt='Arbitrary string')
130 assert h.decode('QWyf8yboH7KT2') == (683, 94108, 123, 5)
131 assert h.decode('neHrCa') == (1, 2, 3)
132 assert h.decode('LRCgf2') == (2, 4, 6)
133 assert h.decode('JOMh1') == (99, 25)
134
135 def test_alphabet(self):
136 h = Hashids(alphabet='!"#%&\',-/0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~&#x27;)

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.95
HashidsClass · 0.90

Tested by

no test coverage detected