diff --git a/.gitignore b/.gitignore index 3448d22..6f10372 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,8 @@ modules.xml /dist /MANIFEST /stripe.egg-info +/bunq_env +/.vscode .python-version *.pyc *.egg diff --git a/setup.py b/setup.py index 0b8ed51..e719bde 100644 --- a/setup.py +++ b/setup.py @@ -56,11 +56,12 @@ # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], - # Require Python version equal or higher than Python 3.6. - python_requires='>=3.6', + # Require Python version equal or higher than the requested version. + python_requires='>=3.5.3', # Keywords related to the project keywords='open-banking sepa bunq finance api payment', diff --git a/tests/model/generated/endpoint/test_monetary_account_bank.py b/tests/model/generated/endpoint/test_monetary_account_bank.py index a16e1d4..37c03df 100644 --- a/tests/model/generated/endpoint/test_monetary_account_bank.py +++ b/tests/model/generated/endpoint/test_monetary_account_bank.py @@ -1,4 +1,11 @@ -from secrets import token_hex +try: + from secrets import token_hex +except ImportError: + from os import urandom + + def token_hex(): + """ Function to replace import for Python < 3.6. """ + return urandom(16).hex() from bunq.sdk.context import BunqContext from bunq.sdk.model.generated.endpoint import MonetaryAccountBank diff --git a/tests/model/generated/endpoint/test_monetary_account_joint.py b/tests/model/generated/endpoint/test_monetary_account_joint.py index c389ebe..a035c53 100644 --- a/tests/model/generated/endpoint/test_monetary_account_joint.py +++ b/tests/model/generated/endpoint/test_monetary_account_joint.py @@ -37,10 +37,9 @@ def test_monetary_account_joint_parser(self): with open(file_path, self._FILE_MODE_READ) as f: json_string = f.read() - joint_account: MonetaryAccountJoint = MonetaryAccountJoint.from_json( - json_string - ) + joint_account = MonetaryAccountJoint.from_json(json_string) + self.assertIsInstance(joint_account, MonetaryAccountJoint) self.assertIsNotNone(joint_account) self.assertIsNotNone(joint_account.all_co_owner) diff --git a/tests/model/generated/endpoint/test_payment.py b/tests/model/generated/endpoint/test_payment.py index 88661d6..0a324d4 100644 --- a/tests/model/generated/endpoint/test_payment.py +++ b/tests/model/generated/endpoint/test_payment.py @@ -52,16 +52,16 @@ def test_payment_batch(self): """ """ - response_create: endpoint.BunqResponseInt = \ - endpoint.PaymentBatch.create( + response_create = endpoint.PaymentBatch.create( self.__create_payment_list() ) + self.assertIsInstance(response_create, endpoint.BunqResponseInt) self.assertIsNotNone(response_create) - response_get: endpoint.BunqResponsePaymentBatch = \ - endpoint.PaymentBatch.get(response_create.value) + response_get = endpoint.PaymentBatch.get(response_create.value) + self.assertIsInstance(response_get, endpoint.BunqResponsePaymentBatch) self.assertIsNotNone(response_get) self.assertFalse(response_get.value.is_all_field_none()) @@ -70,7 +70,7 @@ def __create_payment_list(self) -> List[endpoint.Payment]: :rtype: List[Payment] """ - all_payment: List[endpoint.Payment] = [] + all_payment = [] while len(all_payment) < self._MAXIMUM_PAYMENT_IN_BATCH: all_payment.append( @@ -84,4 +84,6 @@ def __create_payment_list(self) -> List[endpoint.Payment]: ) ) + self.assertIsInstance(all_payment, List) + self.assertIsInstance(all_payment[0], endpoint.Payment) return all_payment