Exemplo n.º 1
0
def test_nbase32_to_bytes():
    assert nbase32_to_bytes("b6af1a5b") == b'I\x10\xd0 i'
Exemplo 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)
Exemplo 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)