Examples - OFX Section 2.5.6
"""
# stdlib imports
import unittest
from datetime import datetime

# local imports
from ofxtools import models
from ofxtools.utils import classproperty, UTC

# test imports
import base


# Common aggregates used across tests
FI = models.FI(org="ABC", fid="000111222")
OK_STATUS = models.STATUS(code=0, severity="INFO")
SUCCESS_STATUS = models.STATUS(code=0, severity="INFO", message="Success")


class PinchRequestTestCase(base.OfxTestCase, unittest.TestCase):
    """
    User requests a password change
    (only pin change transaction portion is shown)
    """

    ofx = """
    <PINCHTRNRQ>
        <TRNUID>888</TRNUID>
        <PINCHRQ>
            <USERID>12345</USERID>
Exemple #2
0
from decimal import Decimal

# local imports
from ofxtools import models
from ofxtools.utils import classproperty, UTC

# test imports
import base

# Common aggregates used across tests
SONRQ = models.SONRQ(
    dtclient=datetime(2005, 10, 29, 10, 10, tzinfo=UTC),
    userid="12345",
    userpass="******",
    language="ENG",
    fi=models.FI(org="NCH", fid="1001"),
    appid="MyApp",
    appver="0500",
)
SIGNONMSGSRQV1 = models.SIGNONMSGSRQV1(sonrq=SONRQ)

STATUS = models.STATUS(code=0, severity="INFO")

SONRS = models.SONRS(
    status=STATUS,
    dtserver=datetime(2005, 10, 29, 10, 10, 3, tzinfo=UTC),
    language="ENG",
    dtprofup=datetime(2004, 10, 29, 10, 10, 3, tzinfo=UTC),
    dtacctup=datetime(2004, 10, 29, 10, 10, 3, tzinfo=UTC),
    fi=models.FI(org="NCH", fid="1001"),
)