Beispiel #1
0
def test_create_from_json(session):
    """Assert that the expiry model renders from a json format correctly."""
    test_json = copy.deepcopy(FINANCING_STATEMENT)
    test_json['trustIndenture'] = True
    trust_indenture = TrustIndenture.create_from_json(test_json, 1234)

    assert trust_indenture[0].trust_indenture == 'Y'
Beispiel #2
0
def test_find_by_id(session):
    """Assert that find trust indenture by trust indenture ID contains all expected elements."""
    trust_indenture = TrustIndenture.find_by_id(200000000)
    assert trust_indenture
    assert trust_indenture.trust_id == 200000000
    assert trust_indenture.registration_id == 200000000
    assert trust_indenture.financing_id == 200000000
    assert trust_indenture.trust_indenture == 'Y'
Beispiel #3
0
def test_find_by_financing_id(session):
    """Assert that find trust indenture by financing statement ID contains all expected elements."""
    trust_indenture = TrustIndenture.find_by_financing_id(200000000)
    assert trust_indenture
    assert len(trust_indenture) == 1
    assert trust_indenture[0].trust_id == 200000000
    assert trust_indenture[0].registration_id == 200000000
    assert trust_indenture[0].financing_id == 200000000
    assert trust_indenture[0].trust_indenture == 'Y'
Beispiel #4
0
def test_find_by_registration_num(session):
    """Assert that find trust indenture by registration number contains all expected elements."""
    trust_indenture = TrustIndenture.find_by_registration_number('TEST0001')
    assert trust_indenture
    assert len(trust_indenture) == 1
    assert trust_indenture[0].trust_id == 200000000
    assert trust_indenture[0].registration_id == 200000000
    assert trust_indenture[0].financing_id == 200000000
    assert trust_indenture[0].trust_indenture == 'Y'
Beispiel #5
0
def test_find_by_reg_num_invalid(session):
    """Assert that find trust indenture by non-existent registration number returns the expected result."""
    trust_indenture = TrustIndenture.find_by_registration_number('300000000')
    assert not trust_indenture
Beispiel #6
0
def test_find_by_financing_id_invalid(session):
    """Assert that find trust indenture by non-existent financing statement ID returns the expected result."""
    trust_indenture = TrustIndenture.find_by_financing_id(300000000)
    assert not trust_indenture