diff --git a/account_statement_import_online_ponto/__manifest__.py b/account_statement_import_online_ponto/__manifest__.py index c2cf4e3a5..ed8f080f7 100644 --- a/account_statement_import_online_ponto/__manifest__.py +++ b/account_statement_import_online_ponto/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Online Bank Statements: MyPonto.com", - "version": "16.0.1.1.1", + "version": "17.0.1.0.0", "category": "Account", "website": "https://github.com/OCA/bank-statement-import", "author": "Florent de Labarre, Therp BV, Odoo Community Association (OCA)", diff --git a/account_statement_import_online_ponto/tests/test_account_statement_import_online_ponto.py b/account_statement_import_online_ponto/tests/test_account_statement_import_online_ponto.py index 91ad83142..1624c9b63 100644 --- a/account_statement_import_online_ponto/tests/test_account_statement_import_online_ponto.py +++ b/account_statement_import_online_ponto/tests/test_account_statement_import_online_ponto.py @@ -6,7 +6,9 @@ from unittest import mock from odoo import _, fields -from odoo.tests import common +from odoo.tests import tagged + +from odoo.addons.base.tests.common import BaseCommon _logger = logging.getLogger(__name__) @@ -174,9 +176,8 @@ transaction_amounts = [5.48, 5.83, 6.08, 8.95] -class TestAccountStatementImportOnlinePonto(common.TransactionCase): - post_install = True - +@tagged("post_install", "-at_install") +class TestAccountStatementImportOnlinePonto(BaseCommon): def setUp(self): super().setUp() @@ -257,7 +258,7 @@ def test_balance_start(self): self.provider._create_or_update_statement( data, statement_date, datetime(2019, 11, 2) ) - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 vals = { "date_since": datetime(2019, 11, 4), "date_until": datetime(2019, 11, 5), @@ -277,7 +278,7 @@ def test_balance_start(self): self.assertEqual(new_statement.balance_end, 105.83) def test_ponto_execution_date(self): - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 # First base selection on execution date. self.provider.ponto_date_field = "execution_date" statement = self._get_statements_from_wizard() # Will get 1 statement @@ -285,7 +286,7 @@ def test_ponto_execution_date(self): self._check_statement_amounts(statement, transaction_amounts[:2]) def test_ponto_value_date(self): - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 # First base selection on execution date. self.provider.ponto_date_field = "value_date" statement = self._get_statements_from_wizard() # Will get 1 statement @@ -293,7 +294,7 @@ def test_ponto_value_date(self): self._check_statement_amounts(statement, transaction_amounts[:3]) def test_ponto_get_transactions_multi(self): - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions_multi(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions_multi(): # noqa: E501 # First base selection on execution date. self.provider.ponto_date_field = "execution_date" # Expect statements for october and november. @@ -310,7 +311,7 @@ def test_ponto_get_transactions_multi(self): ) def test_ponto_scheduled(self): - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 # Scheduled should get all transaction, ignoring date_until. self.provider.ponto_last_identifier = False date_since = datetime(2019, 11, 3) @@ -326,7 +327,7 @@ def test_ponto_scheduled(self): ) def test_ponto_scheduled_from_identifier(self): - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 # Scheduled should get all transactions after last identifier. self.provider.ponto_last_identifier = "9ac50483-16dc-4a82-aa60-df56077405cd" date_since = datetime(2019, 11, 3) @@ -416,7 +417,7 @@ def test_wizard_action_debug(self): self.provider._create_or_update_statement( data, statement_date, datetime(2019, 11, 2) ) - with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: B950 + with self.mock_login(), self.mock_set_access_account(), self.mock_get_transactions(): # noqa: E501 vals = { "date_since": datetime(2019, 11, 4), "date_until": datetime(2019, 11, 5), diff --git a/account_statement_import_online_ponto/tests/test_ponto_interface.py b/account_statement_import_online_ponto/tests/test_ponto_interface.py index 4e8d1e54f..cbaf2268b 100644 --- a/account_statement_import_online_ponto/tests/test_ponto_interface.py +++ b/account_statement_import_online_ponto/tests/test_ponto_interface.py @@ -6,14 +6,15 @@ from dateutil.relativedelta import relativedelta from odoo import fields -from odoo.tests import common +from odoo.tests import tagged -from .test_account_statement_import_online_ponto import FOUR_TRANSACTIONS +from odoo.addons.base.tests.common import BaseCommon +from .test_account_statement_import_online_ponto import FOUR_TRANSACTIONS -class TestPontoInterface(common.TransactionCase): - post_install = True +@tagged("post_install", "-at_install") +class TestPontoInterface(BaseCommon): @patch("requests.post") def test_login(self, requests_post): """Check Ponto API login.""" diff --git a/account_statement_import_online_ponto/views/online_bank_statement_provider.xml b/account_statement_import_online_ponto/views/online_bank_statement_provider.xml index d84642454..267dc370a 100644 --- a/account_statement_import_online_ponto/views/online_bank_statement_provider.xml +++ b/account_statement_import_online_ponto/views/online_bank_statement_provider.xml @@ -9,11 +9,7 @@ /> - +