Beispiel #1
0
def test_watchlisted(mock_post):
    output = responses["watchlist"]
    mock_post.return_value = R(body["watchlist"])
    assert Bvn(b).bvn_watchlisted({
        "body": {
            "BVN": "12345678901"
        },
        "Aes_key": aes,
        "Iv_key": iv
    }) == output, "should return an object"
Beispiel #2
0
def test_multiple_bvn(mock_post):
    data = responses["multiple_bvn"]
    mock_post.return_value = R(body["multiple_bvn"])
    assert Bvn(b).verify_multiple({
        "bvns": {
            "BVNS": "1234567890 1, 12345678902, 12345678903"
        },
        "Aes_key": aes,
        "Iv_key": iv
    }) == data, "should return object"
Beispiel #3
0
def test_verify_single(mock_post):
    data = responses["single_bvn"]
    mock_post.return_value = R(body["single_bvn"])
    assert Bvn(b).verify_single({
        "body": {
            "BVN": "12345678901"
        },
        "Aes_key": aes,
        "Iv_key": iv
    }) == data, "should return object"
Beispiel #4
0
def test_validate_record(mock_post):
    response = responses["record"]
    mock_post.return_value = R(body["record"])
    assert Record(b).validate_record({
        "body": {
            "BVN": "12345678901",
            "FirstName": "Uchenna",
            "LastName": "Okoro",
            "MiddleName": "Adepoju",
            "AccountNumber": "0987654321",
            "BankCode": "011"
        },
        "Aes_key": aes, "Iv_key": iv}) == response, "should return an object"
Beispiel #5
0
def test_verify_finger_print(mock_post):
    response = responses["fingerprint_data"]
    mock_post.return_value = R(body["fingerprint_data"])
    assert FingerPrint(b).verify_fingerprint({"body": {
        "BVN": "12345678901",
        "DeviceId": "Z000112BC12",
        "ReferenceNumber": "00099201710012205354422",
        "FingerImage": {
            "type": "ISO_2005",
            "position": "RT",
            "nist_impression_type": "0",
            "value": "c2RzZnNkZnNzZGY="
        }
    }, "Aes_key": aes, "Iv_key": iv}) == response, "should return an object"
Beispiel #6
0
def test_placeholder_reset(mock_post):
    data = {'aes_key': aes, 'password': "******", 'ivkey': iv}
    mock_post.return_value = R("")
    assert Record(b).bvn_placeholder_reset() == data, "should return an object"
Beispiel #7
0
def test_fp_reset(mock_post):
    data = {'aes_key': aes, 'password': "******", 'ivkey': iv}
    mock_post.return_value = R("")
    assert FingerPrint(b).reset() == data, "should return an object"