File tree Expand file tree Collapse file tree 5 files changed +22
-11
lines changed
tests/model/generated/endpoint Expand file tree Collapse file tree 5 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ modules.xml
7171/dist
7272/MANIFEST
7373/stripe.egg-info
74+ /bunq_env
75+ /.vscode
7476.python-version
7577* .pyc
7678* .egg
Original file line number Diff line number Diff line change 5656
5757 # Specify the Python versions you support here. In particular, ensure
5858 # that you indicate whether you support Python 2, Python 3 or both.
59+ 'Programming Language :: Python :: 3.5' ,
5960 'Programming Language :: Python :: 3.6' ,
6061 ],
6162
62- # Require Python version equal or higher than Python 3.6 .
63- python_requires = '>=3.6 ' ,
63+ # Require Python version equal or higher than the requested version .
64+ python_requires = '>=3.5.3 ' ,
6465
6566 # Keywords related to the project
6667 keywords = 'open-banking sepa bunq finance api payment' ,
Original file line number Diff line number Diff line change 1- from secrets import token_hex
1+ try :
2+ from secrets import token_hex
3+ except ImportError :
4+ from os import urandom
5+
6+ def token_hex ():
7+ """ Function to replace import for Python < 3.6. """
8+ return urandom (16 ).hex ()
29
310from bunq .sdk .context import BunqContext
411from bunq .sdk .model .generated .endpoint import MonetaryAccountBank
Original file line number Diff line number Diff line change @@ -37,10 +37,9 @@ def test_monetary_account_joint_parser(self):
3737 with open (file_path , self ._FILE_MODE_READ ) as f :
3838 json_string = f .read ()
3939
40- joint_account : MonetaryAccountJoint = MonetaryAccountJoint .from_json (
41- json_string
42- )
40+ joint_account = MonetaryAccountJoint .from_json (json_string )
4341
42+ self .assertIsInstance (joint_account , MonetaryAccountJoint )
4443 self .assertIsNotNone (joint_account )
4544 self .assertIsNotNone (joint_account .all_co_owner )
4645
Original file line number Diff line number Diff line change @@ -52,16 +52,16 @@ def test_payment_batch(self):
5252 """
5353 """
5454
55- response_create : endpoint .BunqResponseInt = \
56- endpoint .PaymentBatch .create (
55+ response_create = endpoint .PaymentBatch .create (
5756 self .__create_payment_list ()
5857 )
5958
59+ self .assertIsInstance (response_create , endpoint .BunqResponseInt )
6060 self .assertIsNotNone (response_create )
6161
62- response_get : endpoint .BunqResponsePaymentBatch = \
63- endpoint .PaymentBatch .get (response_create .value )
62+ response_get = endpoint .PaymentBatch .get (response_create .value )
6463
64+ self .assertIsInstance (response_get , endpoint .BunqResponsePaymentBatch )
6565 self .assertIsNotNone (response_get )
6666 self .assertFalse (response_get .value .is_all_field_none ())
6767
@@ -70,7 +70,7 @@ def __create_payment_list(self) -> List[endpoint.Payment]:
7070 :rtype: List[Payment]
7171 """
7272
73- all_payment : List [ endpoint . Payment ] = []
73+ all_payment = []
7474
7575 while len (all_payment ) < self ._MAXIMUM_PAYMENT_IN_BATCH :
7676 all_payment .append (
@@ -84,4 +84,6 @@ def __create_payment_list(self) -> List[endpoint.Payment]:
8484 )
8585 )
8686
87+ self .assertIsInstance (all_payment , List )
88+ self .assertIsInstance (all_payment [0 ], endpoint .Payment )
8789 return all_payment
You can’t perform that action at this time.
0 commit comments