Skip to content

Commit 4de204d

Browse files
author
Kevin Hellemun
committed
Added test for monetary account joint. (#52)
1 parent f4afe44 commit 4de204d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import os
2+
3+
from bunq.sdk.model.generated.endpoint import MonetaryAccountJoint
4+
from tests.bunq_test import BunqSdkTestCase
5+
6+
7+
class TestMonetaryAccountJoint(BunqSdkTestCase):
8+
_BASE_PATH_JSON_MODEL = '../../../assets/ResponseJsons'
9+
_MONETARY_ACCOUNT_JOINT_JSON = '/MonetaryAccountJoint.json'
10+
_FILE_MODE_READ = 'r'
11+
12+
@classmethod
13+
def setUpClass(cls):
14+
pass
15+
16+
def setUp(self):
17+
pass
18+
19+
def test_monetary_account_joint_parser(self):
20+
base_path = os.path.dirname(__file__)
21+
file_path = os.path.abspath(
22+
os.path.join(base_path,
23+
self._BASE_PATH_JSON_MODEL +
24+
self._MONETARY_ACCOUNT_JOINT_JSON
25+
)
26+
)
27+
28+
with open(file_path, self._FILE_MODE_READ) as f:
29+
json_string = f.read()
30+
31+
joint_account: MonetaryAccountJoint = MonetaryAccountJoint.from_json(
32+
json_string
33+
)
34+
35+
self.assertIsNotNone(joint_account)
36+
self.assertIsNotNone(joint_account.all_co_owner)
37+
38+
for co_owner in joint_account.all_co_owner:
39+
self.assertIsNotNone(co_owner.alias)

0 commit comments

Comments
 (0)