Skip to content

Commit 9316baa

Browse files
authored
Fix type error (#153)
* fix typo error * Update version.py * Fix general invalid biller exc * Update test_bill_payments.py * Update exc.py
1 parent 62fa724 commit 9316baa

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

arcus/exc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class InvalidAuth(ArcusException):
1212

1313

1414
class InvalidBiller(ArcusException):
15-
def __init__(self, biller_id: Union[int, str]):
15+
def __init__(self, biller_id: Union[int, str], **kwargs):
1616
self.message = f'{biller_id} is an invalid biller_id'
1717

1818

@@ -248,7 +248,7 @@ def __init__(self, **kwargs):
248248
R16=FailedConsult,
249249
R17=InvalidAmount,
250250
R18=LimitExceeded,
251-
R19=UnprocessableEntity,
251+
R19=InvalidBiller,
252252
R20=InvalidBiller,
253253
R21=InvalidBiller,
254254
R22=BillerMaintenance,

arcus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.2.9' # pragma: no cover
1+
__version__ = '1.2.10' # pragma: no cover

tests/resources/test_bill_payments.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from arcus.exc import InvalidAccountNumber, UnprocessableEntity
3+
from arcus.exc import InvalidAccountNumber, InvalidBiller
44
from arcus.resources import BillPayment
55

66

@@ -45,11 +45,8 @@ def test_bill_payment_type_error(client):
4545
biller_id = 13599
4646
account_number = '559999'
4747
amount = 100.0
48-
with pytest.raises(UnprocessableEntity) as excinfo:
48+
with pytest.raises(InvalidBiller):
4949
client.bill_payments.create(biller_id, account_number, amount)
50-
exc = excinfo.value
51-
assert exc.account_number == account_number
52-
assert exc.biller_id == biller_id
5350

5451

5552
def test_bill_payment_list(client):

0 commit comments

Comments
 (0)