MCPcopy Index your code
hub / github.com/davidaurelio/hashids-python / test_encode_hex

Method test_encode_hex

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

Source from the content-addressed store, hash-verified

88 assert Hashids().encode(1, 2.5, 3) == ''
89
90 def test_encode_hex(self):
91 assert Hashids().encode_hex('507f1f77bcf86cd799439011') == 'y42LW46J9luq3Xq9XMly'
92 assert len(Hashids(min_length=1000).encode_hex('507f1f77bcf86cd799439011')) >= 1000
93 assert Hashids().encode_hex('f000000000000000000000000000000000000000000000000000000000000000000000000000000000000f') == \
94 'WxMLpERDrmh25Lp4L3xEfM6WovWYO3IjkRMKR2ogCMVzn4zQlqt1WK8jKq7OsEpy2qyw1Vi2p'
95
96 def test_illegal_hex(self):
97 assert Hashids().encode_hex('') == ''

Callers

nothing calls this directly

Calls 2

HashidsClass · 0.90
encode_hexMethod · 0.80

Tested by

no test coverage detected