33import pytest
44
55from ws_api .exceptions import WSApiException
6+ from ws_api .formatters import format_account_description
67from ws_api .session import WSAPISession
78from ws_api .wealthsimple_api import WealthsimpleAPI , WealthsimpleAPIBase
89
@@ -155,7 +156,7 @@ def test_account_add_description(api, unified_type, expected_desc):
155156 "accountFeatures" : [],
156157 "custodianAccounts" : [],
157158 }
158- api . _account_add_description (account )
159+ format_account_description (account )
159160 assert account ["description" ] == expected_desc
160161
161162
@@ -169,7 +170,7 @@ def test_account_add_description_cash(api):
169170 "accountFeatures" : [],
170171 "custodianAccounts" : [{"branch" : "WS" , "id" : "cust123" , "status" : "open" }],
171172 }
172- api . _account_add_description (account )
173+ format_account_description (account )
173174 assert account ["description" ] == "Cash"
174175 assert account ["number" ] == "cust123"
175176
@@ -183,7 +184,7 @@ def test_account_add_description_cash_joint(api):
183184 "accountFeatures" : [],
184185 "custodianAccounts" : [],
185186 }
186- api . _account_add_description (account )
187+ format_account_description (account )
187188 assert account ["description" ] == "Cash: joint"
188189
189190
@@ -196,7 +197,7 @@ def test_account_add_description_managed_private_credit(api):
196197 "accountFeatures" : [{"name" : "PRIVATE_CREDIT" }],
197198 "custodianAccounts" : [],
198199 }
199- api . _account_add_description (account )
200+ format_account_description (account )
200201 assert account ["description" ] == "Non-registered: managed - private credit"
201202
202203
@@ -209,7 +210,7 @@ def test_account_add_description_managed_private_equity(api):
209210 "accountFeatures" : [{"name" : "PRIVATE_EQUITY" }],
210211 "custodianAccounts" : [],
211212 }
212- api . _account_add_description (account )
213+ format_account_description (account )
213214 assert account ["description" ] == "Non-registered: managed - private equity"
214215
215216
@@ -223,7 +224,7 @@ def test_account_add_description_nickname_override(api):
223224 "accountFeatures" : [],
224225 "custodianAccounts" : [],
225226 }
226- api . _account_add_description (account )
227+ format_account_description (account )
227228 assert account ["description" ] == "My Retirement Fund"
228229
229230
@@ -236,7 +237,7 @@ def test_account_add_description_unknown_type_fallback(api):
236237 "accountFeatures" : [],
237238 "custodianAccounts" : [],
238239 }
239- api . _account_add_description (account )
240+ format_account_description (account )
240241 assert account ["description" ] == "SOME_FUTURE_TYPE"
241242
242243
0 commit comments