Skip to content

Commit

Permalink
Fix type error (#153)
Browse files Browse the repository at this point in the history
* fix typo error

* Update version.py

* Fix general invalid biller exc

* Update test_bill_payments.py

* Update exc.py
  • Loading branch information
pachCode authored Feb 21, 2022
1 parent 62fa724 commit 9316baa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions arcus/exc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InvalidAuth(ArcusException):


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


Expand Down Expand Up @@ -248,7 +248,7 @@ def __init__(self, **kwargs):
R16=FailedConsult,
R17=InvalidAmount,
R18=LimitExceeded,
R19=UnprocessableEntity,
R19=InvalidBiller,
R20=InvalidBiller,
R21=InvalidBiller,
R22=BillerMaintenance,
Expand Down
2 changes: 1 addition & 1 deletion arcus/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.9' # pragma: no cover
__version__ = '1.2.10' # pragma: no cover
7 changes: 2 additions & 5 deletions tests/resources/test_bill_payments.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from arcus.exc import InvalidAccountNumber, UnprocessableEntity
from arcus.exc import InvalidAccountNumber, InvalidBiller
from arcus.resources import BillPayment


Expand Down Expand Up @@ -45,11 +45,8 @@ def test_bill_payment_type_error(client):
biller_id = 13599
account_number = '559999'
amount = 100.0
with pytest.raises(UnprocessableEntity) as excinfo:
with pytest.raises(InvalidBiller):
client.bill_payments.create(biller_id, account_number, amount)
exc = excinfo.value
assert exc.account_number == account_number
assert exc.biller_id == biller_id


def test_bill_payment_list(client):
Expand Down

0 comments on commit 9316baa

Please sign in to comment.