Esempio n. 1
0
def test_sepa_supports(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    iban = client.get(iban=TEST_IBAN)
    assert iban.is_valid()
    assert iban.supports_sct
    assert iban.supports_sdd
    assert iban.supports_cor1
    assert not iban.supports_b2b
    assert iban.supports_scc
Esempio n. 2
0
def test_iban_attributes(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    iban = client.get(iban=TEST_IBAN)
    assert iban.is_valid()
    assert iban.bank == 'norisbank'
    assert iban.city == 'Berlin'
    assert iban.zip == "10625"
    assert iban.email is None
    assert iban.country == 'Germany'
    assert iban.account == "0209299700"
Esempio n. 3
0
def test_invalid_iban(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    iban = client.get(iban=INVALID_TEST_IBAN)
    assert not iban.is_valid()
Esempio n. 4
0
def test_get_bic(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    iban = client.get(iban=TEST_IBAN)
    assert iban.bic == 'NORSDE51'
Esempio n. 5
0
def test_validate_raise_exception(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    iban = client.get(iban=INVALID_TEST_IBAN)
    with pytest.raises(ibancom.IBANValidationException):
        iban.validate()
Esempio n. 6
0
def test_iban_exception(request_get):
    client = ibancom.IBANClient(api_key='FAKE_KEY')
    with pytest.raises(ibancom.IBANException):
        client.get(iban=INVALID_TEST_IBAN)
Esempio n. 7
0
def test_valid_iban(request_get):
    client = ibancom.IBANClient(api_key="FAKE_KEY")
    iban = client.get(iban=TEST_IBAN)
    assert iban.is_valid()