1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
import mt940
def test_entry_dates_wrapping_years():
transactions = mt940.models.Transactions()
statement = mt940.tags.Statement()
data = dict(
amount='123',
status='D',
year=2000,
)
# Regular statement
statement(transactions, dict(
data.items(),
month=1,
day=1,
))
# Statement which wraps to the future
statement(transactions, dict(
data.items(),
month=12,
day=31,
entry_day=1,
entry_month=1,
))
# Statement which wraps the past year
statement(transactions, dict(
data.items(),
month=1,
day=1,
entry_day=31,
entry_month=12,
))
|