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
7979.idea /codeStyles /
8080venv
8181
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
8686
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ common scenarios can run without any errors.
1010
1111## Installation and Execution
1212
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+
1318You can install all the required dependencies with the following command:
1419
1520 python3 setup.py install
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class BunqSdkTestCase(unittest.TestCase):
4343
4444 _EMAIL_BRAVO = 'bravo@bunq.com'
4545
46- __TIME_OUT_AUTO_ACCEPT_SPENDING_MONEY = 0.5
46+ __TIME_OUT_AUTO_ACCEPT_SPENDING_MONEY = 2
4747
4848 _second_monetary_account = None
4949
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ class TestPsd2Context(unittest.TestCase):
1414 Psd2Context
1515 """
1616
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'
1919
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'
2323
2424 _TEST_DEVICE_DESCRIPTION = 'PSD2TestDevice'
2525
@@ -72,8 +72,8 @@ def test_create_oauth_client(self) -> None:
7272 return
7373
7474 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
7777
7878 self .assertIsNotNone (oauth_client )
7979
Original file line number Diff line number Diff line change 1+ import time
12from typing import List , Dict
23
34from bunq import Pagination
@@ -15,6 +16,8 @@ class TestPaginationScenario(BunqSdkTestCase):
1516 Pagination
1617 """
1718
19+ __TIME_OUT_PREVENT_RATE_LIMIT = 2
20+
1821 @classmethod
1922 def setUpClass (cls ):
2023 cls ._PAYMENT_LISTING_PAGE_SIZE = 2
@@ -31,10 +34,15 @@ def test_api_scenario_payment_listing_with_pagination(self):
3134 payments_expected = self ._payments_required ()
3235 pagination = Pagination ()
3336 pagination .count = self ._PAYMENT_LISTING_PAGE_SIZE
37+
38+ time .sleep (self .__TIME_OUT_PREVENT_RATE_LIMIT )
3439 response_latest = self ._list_payments (pagination .url_params_count_only )
3540 pagination_latest = response_latest .pagination
41+
42+ time .sleep (self .__TIME_OUT_PREVENT_RATE_LIMIT )
3643 response_previous = self ._list_payments (pagination_latest .url_params_previous_page )
3744 pagination_previous = response_previous .pagination
45+
3846 response_previous_next = self ._list_payments (pagination_previous .url_params_next_page )
3947 payments_previous = response_previous .value
4048 payments_previous_next = response_previous_next .value
You can’t perform that action at this time.
0 commit comments