File tree Expand file tree Collapse file tree 5 files changed +25
-12
lines changed Expand file tree Collapse file tree 5 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ bunq_sdk.egg-info
79
79
.idea /codeStyles /
80
80
venv
81
81
82
- tests /assets / bunq-oauth-psd2-test.conf
83
- tests /assets / bunq-psd2-test.conf
84
- tests /assets / key.pem
85
- tests /assets / certificate.pem
82
+ tests /bunq-oauth-psd2-test.conf
83
+ tests /bunq-psd2-test.conf
84
+ tests /key.pem
85
+ tests /certificate.pem
86
86
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ common scenarios can run without any errors.
10
10
11
11
## Installation and Execution
12
12
13
+ openssl req -x509 -newkey rsa:4096 -keyout tests/key.pem -out tests/certificate.pem -days 365 -nodes -subj "/CN=adsadsahjksbhjbdjhasds/C=NL" && \
14
+ echo -e "\n--- KEY ---\n" && cat tests/key.pem && \
15
+ echo -e "\n--- CERTIFICATE ---\n" && cat tests/certificate.pem
16
+
17
+
13
18
You can install all the required dependencies with the following command:
14
19
15
20
python3 setup.py install
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class BunqSdkTestCase(unittest.TestCase):
43
43
44
44
_EMAIL_BRAVO = 'bravo@bunq.com'
45
45
46
- __TIME_OUT_AUTO_ACCEPT_SPENDING_MONEY = 0.5
46
+ __TIME_OUT_AUTO_ACCEPT_SPENDING_MONEY = 2
47
47
48
48
_second_monetary_account = None
49
49
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ class TestPsd2Context(unittest.TestCase):
14
14
Psd2Context
15
15
"""
16
16
17
- _FILE_TEST_CONFIGURATION = '/assets/ bunq-psd2-test.conf'
18
- _FILE_TEST_OAUTH = '/assets/ bunq-oauth-psd2-test.conf'
17
+ _FILE_TEST_CONFIGURATION = '/bunq-psd2-test.conf'
18
+ _FILE_TEST_OAUTH = '/bunq-oauth-psd2-test.conf'
19
19
20
- _FILE_TEST_CERTIFICATE = '/assets/ certificate.pem'
21
- _FILE_TEST_CERTIFICATE_CHAIN = '/assets/ certificate.pem'
22
- _FILE_TEST_PRIVATE_KEY = '/assets/ key.pem'
20
+ _FILE_TEST_CERTIFICATE = '/certificate.pem'
21
+ _FILE_TEST_CERTIFICATE_CHAIN = '/certificate.pem'
22
+ _FILE_TEST_PRIVATE_KEY = '/key.pem'
23
23
24
24
_TEST_DEVICE_DESCRIPTION = 'PSD2TestDevice'
25
25
@@ -72,8 +72,8 @@ def test_create_oauth_client(self) -> None:
72
72
return
73
73
74
74
try :
75
- client_id = OauthClient .create ().value
76
- oauth_client = OauthClient .get (client_id ).value
75
+ client_id = OauthClientApiObject .create ().value
76
+ oauth_client = OauthClientApiObject .get (client_id ).value
77
77
78
78
self .assertIsNotNone (oauth_client )
79
79
Original file line number Diff line number Diff line change
1
+ import time
1
2
from typing import List , Dict
2
3
3
4
from bunq import Pagination
@@ -15,6 +16,8 @@ class TestPaginationScenario(BunqSdkTestCase):
15
16
Pagination
16
17
"""
17
18
19
+ __TIME_OUT_PREVENT_RATE_LIMIT = 2
20
+
18
21
@classmethod
19
22
def setUpClass (cls ):
20
23
cls ._PAYMENT_LISTING_PAGE_SIZE = 2
@@ -31,10 +34,15 @@ def test_api_scenario_payment_listing_with_pagination(self):
31
34
payments_expected = self ._payments_required ()
32
35
pagination = Pagination ()
33
36
pagination .count = self ._PAYMENT_LISTING_PAGE_SIZE
37
+
38
+ time .sleep (self .__TIME_OUT_PREVENT_RATE_LIMIT )
34
39
response_latest = self ._list_payments (pagination .url_params_count_only )
35
40
pagination_latest = response_latest .pagination
41
+
42
+ time .sleep (self .__TIME_OUT_PREVENT_RATE_LIMIT )
36
43
response_previous = self ._list_payments (pagination_latest .url_params_previous_page )
37
44
pagination_previous = response_previous .pagination
45
+
38
46
response_previous_next = self ._list_payments (pagination_previous .url_params_next_page )
39
47
payments_previous = response_previous .value
40
48
payments_previous_next = response_previous_next .value
You can’t perform that action at this time.
0 commit comments