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
71
71
/dist
72
72
/MANIFEST
73
73
/stripe.egg-info
74
+ /bunq_env
75
+ /.vscode
74
76
.python-version
75
77
* .pyc
76
78
* .egg
Original file line number Diff line number Diff line change 56
56
57
57
# Specify the Python versions you support here. In particular, ensure
58
58
# that you indicate whether you support Python 2, Python 3 or both.
59
+ 'Programming Language :: Python :: 3.5' ,
59
60
'Programming Language :: Python :: 3.6' ,
60
61
],
61
62
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 ' ,
64
65
65
66
# Keywords related to the project
66
67
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 ()
2
9
3
10
from bunq .sdk .context import BunqContext
4
11
from 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):
37
37
with open (file_path , self ._FILE_MODE_READ ) as f :
38
38
json_string = f .read ()
39
39
40
- joint_account : MonetaryAccountJoint = MonetaryAccountJoint .from_json (
41
- json_string
42
- )
40
+ joint_account = MonetaryAccountJoint .from_json (json_string )
43
41
42
+ self .assertIsInstance (joint_account , MonetaryAccountJoint )
44
43
self .assertIsNotNone (joint_account )
45
44
self .assertIsNotNone (joint_account .all_co_owner )
46
45
Original file line number Diff line number Diff line change @@ -52,16 +52,16 @@ def test_payment_batch(self):
52
52
"""
53
53
"""
54
54
55
- response_create : endpoint .BunqResponseInt = \
56
- endpoint .PaymentBatch .create (
55
+ response_create = endpoint .PaymentBatch .create (
57
56
self .__create_payment_list ()
58
57
)
59
58
59
+ self .assertIsInstance (response_create , endpoint .BunqResponseInt )
60
60
self .assertIsNotNone (response_create )
61
61
62
- response_get : endpoint .BunqResponsePaymentBatch = \
63
- endpoint .PaymentBatch .get (response_create .value )
62
+ response_get = endpoint .PaymentBatch .get (response_create .value )
64
63
64
+ self .assertIsInstance (response_get , endpoint .BunqResponsePaymentBatch )
65
65
self .assertIsNotNone (response_get )
66
66
self .assertFalse (response_get .value .is_all_field_none ())
67
67
@@ -70,7 +70,7 @@ def __create_payment_list(self) -> List[endpoint.Payment]:
70
70
:rtype: List[Payment]
71
71
"""
72
72
73
- all_payment : List [ endpoint . Payment ] = []
73
+ all_payment = []
74
74
75
75
while len (all_payment ) < self ._MAXIMUM_PAYMENT_IN_BATCH :
76
76
all_payment .append (
@@ -84,4 +84,6 @@ def __create_payment_list(self) -> List[endpoint.Payment]:
84
84
)
85
85
)
86
86
87
+ self .assertIsInstance (all_payment , List )
88
+ self .assertIsInstance (all_payment [0 ], endpoint .Payment )
87
89
return all_payment
You can’t perform that action at this time.
0 commit comments