|
4 | 4 |
|
5 | 5 | from bunq.sdk import context, util |
6 | 6 | from bunq.sdk.client import ApiClient |
7 | | -from bunq.sdk.context import BunqContext |
8 | 7 | from bunq.sdk.exception import BunqException |
9 | 8 | from bunq.sdk.model.generated import endpoint, object_ |
10 | 9 | from tests import config |
@@ -52,13 +51,13 @@ class BunqSdkTestCase(unittest.TestCase): |
52 | 51 |
|
53 | 52 | @classmethod |
54 | 53 | def setUpClass(cls): |
55 | | - BunqContext.load_api_context(cls._get_api_context()) |
| 54 | + context.BunqContext.load_api_context(cls._get_api_context()) |
56 | 55 |
|
57 | 56 | def setUp(self): |
58 | 57 | self.__set_second_monetary_account() |
59 | 58 | self.__request_spending_money() |
60 | 59 | time.sleep(0.5) |
61 | | - BunqContext.user_context().refresh_user_context() |
| 60 | + context.BunqContext.user_context().refresh_user_context() |
62 | 61 |
|
63 | 62 | def __set_second_monetary_account(self): |
64 | 63 | response = endpoint.MonetaryAccountBank.create( |
@@ -161,12 +160,12 @@ def alias_first(self): |
161 | 160 | :rtype: Pointer |
162 | 161 | """ |
163 | 162 |
|
164 | | - if BunqContext.user_context().is_only_user_company_set(): |
165 | | - return BunqContext.user_context().user_company.alias[ |
| 163 | + if context.BunqContext.user_context().is_only_user_company_set(): |
| 164 | + return context.BunqContext.user_context().user_company.alias[ |
166 | 165 | self._FIRST_INDEX] |
167 | 166 |
|
168 | | - if BunqContext.user_context().is_only_user_person_set(): |
169 | | - return BunqContext.user_context().user_person.alias[ |
| 167 | + if context.BunqContext.user_context().is_only_user_person_set(): |
| 168 | + return context.BunqContext.user_context().user_person.alias[ |
170 | 169 | self._FIRST_INDEX] |
171 | 170 |
|
172 | 171 | raise BunqException(self.__ERROR_COULD_NOT_DETERMINE_USER) |
0 commit comments