Ejemplo n.º 1
0
def test_nbase32_to_bytes():
    assert nbase32_to_bytes("b6af1a5b") == b'I\x10\xd0 i'
Ejemplo n.º 2
0
def test_nbase32_to_bytes_empty():
    with pytest.raises(ValueError) as exc:
        nbase32_to_bytes("")

    assert "String is empty" in str(exc.value)
Ejemplo n.º 3
0
def test_nbase32_to_bytes_invalid():
    with pytest.raises(ValueError) as exc:
        nbase32_to_bytes("1112")

    assert "String is not Nano Base32-encoded" in str(exc.value)