Skip to content

Commit bd2f987

Browse files
author
Kevin Hellemun
committed
Return api context instead of saving it to file. (#78)
1 parent 2962349 commit bd2f987

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bunq/sdk/util.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@
1818
" user."
1919

2020

21-
def automatic_sandbox_install(file_path=None):
21+
def automatic_sandbox_install():
2222
"""
23-
:type file_path: str
23+
:rtype: ApiContext
2424
"""
2525

2626
sandbox_user = __generate_new_sandbox_user()
27-
ApiContext(
27+
28+
return ApiContext(
2829
ApiEnvironmentType.SANDBOX,
2930
sandbox_user.api_key,
3031
socket.gethostname()
31-
).save(file_path)
32+
)
3233

3334

3435
def __generate_new_sandbox_user():

tests/bunq_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ def _get_api_context(cls):
103103
:rtype: context.ApiContext
104104
"""
105105

106-
util.automatic_sandbox_install('bunq-test.conf')
107-
108-
return context.ApiContext.restore('bunq-test.conf')
106+
return util.automatic_sandbox_install()
109107

110108
def _get_pointer_bravo(self):
111109
"""

0 commit comments

Comments
 (0)