[Erp5-report] r31025 gregory - /erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 3 13:47:53 CET 2009


Author: gregory
Date: Thu Dec  3 13:47:50 2009
New Revision: 31025

URL: http://svn.erp5.org?rev=31025&view=rev
Log:
Create sub-categories for each created site

Modified:
    erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py

Modified: erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py?rev=31025&r1=31024&r2=31025&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py [utf8] (original)
+++ erp5/trunk/products/ERP5Banking/tests/TestERP5BankingMixin.py [utf8] Thu Dec  3 13:47:50 2009
@@ -627,6 +627,7 @@
     salle_tri = surface_vault_type.newContent('salle_tri')
       
     if not no_site:
+      destination_site_list = [x.getId() for x in created_site_list]
       for c in created_site_list: #self.testsite.getCategoryChildValueList():
         # create bank structure for each agency
         site = c.getId()
@@ -665,7 +666,7 @@
         for ss in ['encaisse_des_billets_et_monnaies', 'encaisse_des_billets_recus_pour_ventilation', 'encaisse_des_differences', 'encaisse_des_externes']:
           ss =  salle_tri.newContent(id='%s' %(ss,), portal_type='Category', codification='',  vault_type='site/surface/salle_tri')
           if 'ventilation' in ss.getId():
-            for country in ['madrid', 'paris']:
+            for country in destination_site_list:
               if country[0] != c.getCodification()[0]:
                 ss.newContent(id='%s' %(country,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
         # caveau
@@ -676,7 +677,7 @@
             for ss in ['encaisse_des_billets_neufs_non_emis', 'encaisse_des_billets_retires_de_la_circulation','encaisse_des_billets_detruits','encaisse_des_billets_neufs_non_emis_en_transit_allant_a']:
               ss =  s.newContent(id='%s' %(ss,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
               if 'transit' in ss.getId():
-                for country in ['madrid', 'paris']:
+                for country in destination_site_list:
                   if country[0] != c.getCodification()[0]:
                     ss.newContent(id='%s' %(country,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
 
@@ -685,7 +686,7 @@
                        'encaisse_des_billets_recus_pour_ventilation','encaisse_des_devises']:
               ss =  s.newContent(id='%s' %(ss,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
               if 'ventilation' in ss.getId():
-                for country in ['madrid', 'paris']:
+                for country in destination_site_list:
                   if country[0] != c.getCodification()[0]:
                     ss.newContent(id='%s' %(country,), portal_type='Category', codification='',  vault_type='site/caveau/%s' %(s.getId(),))
               if 'devises' in ss.getId():




More information about the Erp5-report mailing list