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
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"
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()
def test_get_bic(request_get): client = ibancom.IBANClient(api_key='FAKE_KEY') iban = client.get(iban=TEST_IBAN) assert iban.bic == 'NORSDE51'
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()
def test_iban_exception(request_get): client = ibancom.IBANClient(api_key='FAKE_KEY') with pytest.raises(ibancom.IBANException): client.get(iban=INVALID_TEST_IBAN)
def test_valid_iban(request_get): client = ibancom.IBANClient(api_key="FAKE_KEY") iban = client.get(iban=TEST_IBAN) assert iban.is_valid()