Beispiel #1
0
def test_valid_string():
    assert valid_string(u'example')

    import codecs

    with raises(NotValid):
        valid_string(codecs.getdecoder("hex_codec")(b"02656c6c6f")[0].decode("utf-8"))
Beispiel #2
0
def test_valid_string():
    assert valid_string(u'example')

    import codecs

    raises(NotValid,
           'valid_string(codecs.getdecoder("hex_codec")'
           '(b"02656c6c6f")[0].decode("utf-8"))')
def test_valid_string():
    assert valid_string('example')

    raises(NotValid, 'valid_string(bytes.fromhex("02656c6c6f"))')
Beispiel #4
0
def test_valid_string():
    assert valid_string(u'example')

    raises(NotValid, 'valid_string("02656c6c6f".decode("hex"))')
Beispiel #5
0
def test_valid_string():
    assert valid_string(u'example')
    
    raises( NotValid, 'valid_string("02656c6c6f".decode("hex"))')
Beispiel #6
0
def test_valid_string():
    assert valid_string('example')

    raises(NotValid, 'valid_string(bytes.fromhex("02656c6c6f"))')