Esempio n. 1
0
def test_reply_error_empty_message():
    s = str(nbd.ReplyError(5, ""))
    assert s == "Server error: [Error 5] Input/output error"
Esempio n. 2
0
def test_reply_error_simple():
    s = str(nbd.ReplyError(1, "Simple reply failed"))
    assert s == "Simple reply failed: [Error 1] Operation not permitted"
Esempio n. 3
0
def test_reply_error_unknown_code():
    s = str(nbd.ReplyError(-1, "bad error"))
    assert s == "Bad error: [Error -1] Unknown error -1"
Esempio n. 4
0
def test_reply_error_structured():
    s = str(nbd.ReplyError(28, "writing to file failed"))
    assert s == "Writing to file failed: [Error 28] No space left on device"