(self)
| 175 | assert h.decode(h.encode(1)[:-1] + '0') == () |
| 176 | |
| 177 | def test_decode_hex(self): |
| 178 | hex_str = '507f1f77bcf86cd799439011' |
| 179 | assert Hashids().decode_hex('y42LW46J9luq3Xq9XMly') == hex_str |
| 180 | h = Hashids(min_length=1000) |
| 181 | assert h.decode_hex(h.encode_hex(hex_str)) == hex_str |
| 182 | assert Hashids().decode_hex('WxMLpERDrmh25Lp4L3xEfM6WovWYO3IjkRMKR2ogCMVzn4zQlqt1WK8jKq7OsEpy2qyw1Vi2p') == \ |
| 183 | 'f000000000000000000000000000000000000000000000000000000000000000000000000000000000000f' |
| 184 | |
| 185 | def test_illegal_decode_hex(self): |
| 186 | assert Hashids().decode_hex('') == '' |
nothing calls this directly
no test coverage detected