(self)
| 33 | assert h.encode(99, 25) == '3lKfD' |
| 34 | |
| 35 | def test_salt(self): |
| 36 | h = Hashids(salt='Arbitrary string') |
| 37 | assert h.encode(683, 94108, 123, 5) == 'QWyf8yboH7KT2' |
| 38 | assert h.encode(1, 2, 3) == 'neHrCa' |
| 39 | assert h.encode(2, 4, 6) == 'LRCgf2' |
| 40 | assert h.encode(99, 25) == 'JOMh1' |
| 41 | |
| 42 | def test_alphabet(self): |
| 43 | h = Hashids(alphabet='!"#%&\',-/0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~') |