Example #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")
Example #2
0
File: views.py Project: rixx/pretix
 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()
Example #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()
Example #4
0
 def process_mt940(self):
     return self.confirm_view(mt940import.parse(self.request.FILES.get('file')))
Example #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]