changeset 18:cd07f69ac408

Resetting values in set statement should also set a default description bug6
author Nicolas Évrard <nicoe@b2ck.com>
date Tue, 23 Jun 2015 16:22:40 +0200
parents f229feb202e4
children 2a9ee0edea6e
files CHANGELOG mt940/MT940.txt mt940/__init__.py mt940/test.py
diffstat 4 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Wed Apr 29 11:21:08 2015 +0200
+++ b/CHANGELOG	Tue Jun 23 16:22:40 2015 +0200
@@ -1,3 +1,5 @@
+* Set a default description after setting a statement
+
 Version 0.2 - 2015-04-29
 * Add Statement description
 * Renamed properties of Transaction to follow the norm
--- a/mt940/MT940.txt	Wed Apr 29 11:21:08 2015 +0200
+++ b/mt940/MT940.txt	Tue Jun 23 16:22:40 2015 +0200
@@ -15,3 +15,17 @@
 :61:171214C15,67TIDXTEST//REFERENCE
 :62F:C120514EUR5638,62
 :86:/SUM/
+-
+:20:ABN AMRO BANK NV
+:25:123456789
+:28:13501/1
+:60F:C120511EUR5138,61
+:61:1205120514C500,01N654NONREF
+987654321
+:86:/TRTP/SEPA OVERBOEKING/IBAN/FR12345678901234/BIC/GEFRADAM
+/NAME/QASD JGRED/REMI/Dit zijn de omschrijvingsregels/EREF/NOTPRO
+VIDED
+:61:1412051205RC15,67IDXXREF
+DATA
+:61:171214C15,67TIDXTEST//REFERENCE
+:62F:C120514EUR5638,62
--- a/mt940/__init__.py	Wed Apr 29 11:21:08 2015 +0200
+++ b/mt940/__init__.py	Tue Jun 23 16:22:40 2015 +0200
@@ -157,6 +157,7 @@
                 transactions=[Transaction(*t) for t in transactions],
                 **values))
         values.clear()
+        values['description']
         del transactions[:]
 
 Statement = namedtuple('Statement', ['statement', 'account', 'information',
--- a/mt940/test.py	Wed Apr 29 11:21:08 2015 +0200
+++ b/mt940/test.py	Tue Jun 23 16:22:40 2015 +0200
@@ -46,7 +46,7 @@
 
     def test_number_statements(self):
         "Test number of statements"
-        self.assertEqual(len(self.mt940.statements), 1)
+        self.assertEqual(len(self.mt940.statements), 2)
 
     def test_statement_account(self):
         "Test statement account"