Exemple #1
0
def test_parse():
    for i, d in enumerate(TEST_DATA):
        parsed = parse(io.BytesIO(d.encode('utf-8')))
        pp = pprint.PrettyPrinter(indent=4)
        pp.pprint(parsed)
        assert parsed == EXPECTED[i]
        print("done")
Exemple #2
0
 def process_mt940(self):
     try:
         return self.start_processing(mt940import.parse(self.request.FILES.get('file')))
     except:
         logger.exception('Failed to import MT940 file')
         messages.error(self.request, _('We were unable to process your input.'))
         return self.redirect_back()
Exemple #3
0
 def process_mt940(self):
     try:
         return self.start_processing(
             mt940import.parse(self.request.FILES.get('file')))
     except:
         logger.exception('Failed to import MT940 file')
         messages.error(self.request,
                        _('We were unable to process your input.'))
         return self.redirect_back()
Exemple #4
0
 def process_mt940(self):
     return self.confirm_view(mt940import.parse(self.request.FILES.get('file')))
Exemple #5
0
def test_parse():
    for i, d in enumerate(TEST_DATA):
        parsed = parse(io.BytesIO(d.encode('utf-8')))
        pp = pprint.PrettyPrinter(indent=4)
        pp.pprint(parsed)
        assert parsed == EXPECTED[i]