mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
[14.0][IMP] intrastat_product: Test declaration copy
This commit is contained in:
@@ -29,6 +29,16 @@ class TestIntrastatProduct(IntrastatProductCommon):
|
|||||||
with self.assertRaises(IntegrityError):
|
with self.assertRaises(IntegrityError):
|
||||||
self._create_transport_mode(vals)
|
self._create_transport_mode(vals)
|
||||||
|
|
||||||
|
def test_copy(self):
|
||||||
|
"""
|
||||||
|
When copying declaration, the new one has an incremented revision
|
||||||
|
value.
|
||||||
|
"""
|
||||||
|
vals = {"declaration_type": "dispatches"}
|
||||||
|
self._create_declaration(vals)
|
||||||
|
decl_copy = self.declaration.copy()
|
||||||
|
self.assertEqual(self.declaration.revision + 1, decl_copy.revision)
|
||||||
|
|
||||||
|
|
||||||
class TestIntrastatProductCase(TestIntrastatProduct, SavepointCase):
|
class TestIntrastatProductCase(TestIntrastatProduct, SavepointCase):
|
||||||
""" Test Intrastat Product """
|
""" Test Intrastat Product """
|
||||||
|
|||||||
Reference in New Issue
Block a user