You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.8 KiB

  1. # -*- coding: utf-8 -*-
  2. """Run test to import camt.053 import."""
  3. ##############################################################################
  4. #
  5. # Copyright (C) 2015 Therp BV <http://therp.nl>.
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. from openerp.addons.account_bank_statement_import.tests import (
  22. TestStatementFile)
  23. class TestImport(TestStatementFile):
  24. """Run test to import camt import."""
  25. def test_statement_import(self):
  26. """Test correct creation of single statement."""
  27. transactions = [
  28. {
  29. 'remote_account': 'NL46ABNA0499998748',
  30. 'transferred_amount': -754.25,
  31. 'value_date': '2013-01-05',
  32. 'ref': '435005714488-ABNO33052620',
  33. },
  34. ]
  35. # statement name is account number + '-' + date of last 62F line:
  36. self._test_statement_import(
  37. 'account_bank_statement_import_camt', 'test-camt053.xml',
  38. '1234Test/1',
  39. local_account='NL77ABNA0574908765',
  40. start_balance=15568.27, end_balance=15121.12,
  41. transactions=transactions
  42. )