How to use the ofxparse.OfxParser.parseStatement function in ofxparse

To help you get started, we’ve selected a few ofxparse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jseutter / ofxparse / tests / test_parse.py View on Github external
POS MERCHANDISE;MCDONALD'S #112
   
  
  
   382.34
   20090523122017
  
  
   682.34
   20090523122017
  
 

        '''
        txn = soup_maker(input)
        statement = OfxParser.parseStatement(txn.find('stmttrnrs'))
        self.assertEqual(datetime(2009, 4, 1), statement.start_date)
        self.assertEqual(
            datetime(2009, 5, 23, 12, 20, 17), statement.end_date)
        self.assertEqual(1, len(statement.transactions))
        self.assertEqual(Decimal('382.34'), statement.balance)
        self.assertEqual(datetime(2009, 5, 23, 12, 20, 17), statement.balance_date)
        self.assertEqual(Decimal('682.34'), statement.available_balance)
        self.assertEqual(datetime(2009, 5, 23, 12, 20, 17), statement.available_balance_date)
github jseutter / ofxparse / tests / test_parse.py View on Github external
POS MERCHANDISE;MCDONALD'S #112
   
  
  
   382.34
   20090523122017
  
  
   682.34
   20090523122017
  
 

        '''
        txn = soup_maker(input)
        statement = OfxParser.parseStatement(txn.find('stmttrnrs'))
        self.assertEqual(None, statement.start_date)
        self.assertEqual(None, statement.end_date)
        self.assertEqual(1, len(statement.transactions))
        self.assertEqual(Decimal('382.34'), statement.balance)
        self.assertEqual(datetime(2009, 5, 23, 12, 20, 17), statement.balance_date)
        self.assertEqual(Decimal('682.34'), statement.available_balance)
        self.assertEqual(datetime(2009, 5, 23, 12, 20, 17), statement.available_balance_date)