Skip to content

Commit

Permalink
Added test for monetary account joint. (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Apr 29, 2018
1 parent f4afe44 commit 4de204d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/model/generated/endpoint/test_monetary_account_joint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import os

from bunq.sdk.model.generated.endpoint import MonetaryAccountJoint
from tests.bunq_test import BunqSdkTestCase


class TestMonetaryAccountJoint(BunqSdkTestCase):
_BASE_PATH_JSON_MODEL = '../../../assets/ResponseJsons'
_MONETARY_ACCOUNT_JOINT_JSON = '/MonetaryAccountJoint.json'
_FILE_MODE_READ = 'r'

@classmethod
def setUpClass(cls):
pass

def setUp(self):
pass

def test_monetary_account_joint_parser(self):
base_path = os.path.dirname(__file__)
file_path = os.path.abspath(
os.path.join(base_path,
self._BASE_PATH_JSON_MODEL +
self._MONETARY_ACCOUNT_JOINT_JSON
)
)

with open(file_path, self._FILE_MODE_READ) as f:
json_string = f.read()

joint_account: MonetaryAccountJoint = MonetaryAccountJoint.from_json(
json_string
)

self.assertIsNotNone(joint_account)
self.assertIsNotNone(joint_account.all_co_owner)

for co_owner in joint_account.all_co_owner:
self.assertIsNotNone(co_owner.alias)

0 comments on commit 4de204d

Please sign in to comment.