Fix validate test fail due to bytes/hex change
In python3 we don't have the same freedom with hex decoding that we had before. This test is less elegant now, but still readable.
This commit is contained in:
@@ -56,7 +56,11 @@ def test_valid_non_negative_integer():
|
|||||||
def test_valid_string():
|
def test_valid_string():
|
||||||
assert valid_string(u'example')
|
assert valid_string(u'example')
|
||||||
|
|
||||||
raises(NotValid, 'valid_string("02656c6c6f".decode("hex"))')
|
import codecs
|
||||||
|
|
||||||
|
raises(NotValid,
|
||||||
|
'valid_string(codecs.getdecoder("hex_codec")'
|
||||||
|
'(b"02656c6c6f")[0].decode("utf-8"))')
|
||||||
|
|
||||||
|
|
||||||
def test_valid_anyuri():
|
def test_valid_anyuri():
|
||||||
|
Reference in New Issue
Block a user