Exemple #1
0
def testPutOtpBlob():
    result = otp.putOtpBlob(otpData, sk, urls)

    assert result[url1 + "/" + otpData["id"]].status == 200
    assert result[url1 + "/" + otpData["id"]].response.body == otpData
    assert result[url2 + "/" + otpData["id"]].status == 200
    assert result[url2 + "/" + otpData["id"]].response.body == otpData
Exemple #2
0
def testPutOtpBlobEmptySk():
    with pytest.raises(ValueError) as ex:
        otp.putOtpBlob(otpData, "", urls)
Exemple #3
0
def testPutOtpBlobNoSk():
    with pytest.raises(ValueError) as ex:
        otp.putOtpBlob(otpData, None, urls)
Exemple #4
0
def testPutOtpBlobEmptyUrls():
    with pytest.raises(ValueError) as ex:
        otp.putOtpBlob(otpData, sk, [])
Exemple #5
0
def testPutOtpBlobNoUrls():
    with pytest.raises(ValueError) as ex:
        otp.putOtpBlob(otpData, sk, None)