summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authoroco-odoo <oco@odoo.com>2021-04-06 09:17:15 +0000
committeroco-odoo <oco@odoo.com>2021-04-06 09:17:15 +0000
commit2dbc0c08b556afa89628fc2355446cdd53b01b41 (patch)
treeb1ef24412319b84f9e567cb0ca852d9c35d829ba /addons
parentbaa1f3e05ae4d8166549336dabc2ce5fc093a489 (diff)
[FIX] base_vat: remove duplicate test
Forward-port error. closes odoo/odoo#68804 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/base_vat/tests/test_validate_ruc.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/addons/base_vat/tests/test_validate_ruc.py b/addons/base_vat/tests/test_validate_ruc.py
index b7a3be3fbf6..ed189bff784 100644
--- a/addons/base_vat/tests/test_validate_ruc.py
+++ b/addons/base_vat/tests/test_validate_ruc.py
@@ -56,35 +56,6 @@ class TestStructure(SavepointCase):
with patch('odoo.addons.base_vat.models.res_partner.check_vies', type(self)._vies_check_func):
self.env.user.company_id.vat_check_vies = True
- def test_vat_validation(self):
- """ Tests VAT validation (both successes and failures), with the different country
- detection cases possible.
- """
- # Disable VIES; syntactic verification is enough for this test case
- self.env.user.company_id.vat_check_vies = False
-
- test_partner =self.env['res.partner'].create({'name': "John Dex"})
-
- # VAT starting with country code: use the starting country code
- test_partner.write({'vat': 'BE0477472701', 'country_id': self.env.ref('base.fr').id})
- test_partner.write({'vat': 'BE0477472701', 'country_id': None})
-
- with self.assertRaises(ValidationError):
- test_partner.write({'vat': 'BE42', 'country_id': self.env.ref('base.fr').id})
-
- with self.assertRaises(ValidationError):
- test_partner.write({'vat': 'BE42', 'country_id': None})
-
- # No country code in VAT: use the partner's country
- test_partner.write({'vat': '0477472701', 'country_id': self.env.ref('base.be').id})
-
- with self.assertRaises(ValidationError):
- test_partner.write({'vat': '42', 'country_id': self.env.ref('base.be').id})
-
- # If no country can be guessed: VAT number cannot be validated
- with self.assertRaises(ValidationError):
- test_partner.write({'vat': '0477472701', 'country_id': None})
-
def test_vat_syntactic_validation(self):
""" Tests VAT validation (both successes and failures), with the different country
detection cases possible.