File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
tests/model/generated/endpoint Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
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 )
You can’t perform that action at this time.
0 commit comments