[PATCH 4 of 6 seda] [diag / test] Avoid unnecessary transaction in test

Sylvain Thenault sylvain.thenault at logilab.fr
Mon Dec 11 16:51:35 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1512573736 -3600
#      Wed Dec 06 16:22:16 2017 +0100
# Node ID 9457420d2e21c5cab937d12b6ee0c5653cbaf67b
# Parent  75fa8c7922bd43c01c509fd4005c8ac4841df990
[diag / test] Avoid unnecessary transaction in test

diff --git a/test/test_diag.py b/test/test_diag.py
--- a/test/test_diag.py
+++ b/test/test_diag.py
@@ -150,13 +150,11 @@ class CompatAnalyzerTC(CubicWebTC):
         with self.admin_access.cnx() as cnx:
             transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'test profile')
             doctor = transfer.cw_adapt_to('ISEDACompatAnalyzer')
             testutils.create_archive_unit(transfer)
             testutils.create_archive_unit(transfer, user_cardinality=u'0..1')
-            unit2 = testutils.create_archive_unit(transfer, user_cardinality=u'1')[0]
-            cnx.commit()
-            unit2.cw_set(user_cardinality=u'1..n')
+            unit2 = testutils.create_archive_unit(transfer, user_cardinality=u'0..1')[0]
             cnx.commit()
 
             self.assertIsRNGAmbiguous(transfer, True)
             self.assertErrorOn(doctor, 'rng_ambiguity', [(transfer, 'seda_archive_units_tab')])
 


More information about the saem-devel mailing list