(self)
| 40 | assert h.encode(99, 25) == 'JOMh1' |
| 41 | |
| 42 | def test_alphabet(self): |
| 43 | h = Hashids(alphabet='!"#%&\',-/0123456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~') |
| 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') |