Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)