[14.0][IMP] intrastat_product: Test declaration copy

This commit is contained in:
Denis Roussel
2021-10-24 13:59:08 +02:00
parent 15582cc2e2
commit 69c79ae07e

View File

@@ -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 """