Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
129
Merge Requests
129
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
8995b645
Commit
8995b645
authored
May 09, 2012
by
Julien Muchembled
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: always start transactions with begin() and make tic() commit automatically
parent
ee196dff
Changes
201
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
201 changed files
with
632 additions
and
2493 deletions
+632
-2493
testStandardConfigurationWorkflow.py
...ard/TestTemplateItem/testStandardConfigurationWorkflow.py
+0
-2
revision
bt5/erp5_configurator_standard/bt/revision
+1
-1
TestEGovMixin.py
bt5/erp5_egov/TestTemplateItem/TestEGovMixin.py
+1
-6
revision
bt5/erp5_egov/bt/revision
+1
-1
testDiscussionThread.py
...5_forum_tutorial/TestTemplateItem/testDiscussionThread.py
+1
-3
revision
bt5/erp5_forum_tutorial/bt/revision
+1
-1
testLiveIngestion.py
bt5/erp5_ingestion/TestTemplateItem/testLiveIngestion.py
+0
-7
revision
bt5/erp5_ingestion/bt/revision
+1
-1
testInotifyTool.py
bt5/erp5_inotify/TestTemplateItem/testInotifyTool.py
+8
-9
revision
bt5/erp5_inotify/bt/revision
+1
-1
testERP5SocialContracts.py
...ial_contracts/TestTemplateItem/testERP5SocialContracts.py
+1
-8
revision
bt5/erp5_social_contracts/bt/revision
+1
-1
testOxatisSynchronization.py
...oxatis_test/TestTemplateItem/testOxatisSynchronization.py
+0
-15
revision
bt5/erp5_tiosafe_oxatis_test/bt/revision
+1
-1
testUbercartSynchronisation.py
...cart_test/TestTemplateItem/testUbercartSynchronisation.py
+0
-18
revision
bt5/erp5_tiosafe_ubercart_test/bt/revision
+1
-1
testVirtuemartSynchronization.py
...rt_test/TestTemplateItem/testVirtuemartSynchronization.py
+1
-22
revision
bt5/erp5_tiosafe_virtuemart_test/bt/revision
+1
-1
testLiveUpgrader.py
bt5/erp5_upgrader/TestTemplateItem/testLiveUpgrader.py
+9
-10
revision
bt5/erp5_upgrader/bt/revision
+1
-1
testShaCache.py
bt5/erp5_web_shacache/TestTemplateItem/testShaCache.py
+1
-7
revision
bt5/erp5_web_shacache/bt/revision
+1
-1
testShaDir.py
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
+1
-12
revision
bt5/erp5_web_shadir/bt/revision
+1
-1
testShaCacheExternal.py
...etworkcache_erp5/TestTemplateItem/testShaCacheExternal.py
+0
-3
testShaCacheSecurity.py
...etworkcache_erp5/TestTemplateItem/testShaCacheSecurity.py
+0
-2
testShaDirExternal.py
bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py
+0
-4
testShaDirSecurity.py
bt5/networkcache_erp5/TestTemplateItem/testShaDirSecurity.py
+0
-2
revision
bt5/networkcache_erp5/bt/revision
+1
-1
testConflictResolution.py
...ict_resolution/TestTemplateItem/testConflictResolution.py
+5
-6
revision
bt5/test_conflict_resolution/bt/revision
+1
-1
testCMFActivity.py
product/CMFActivity/tests/testCMFActivity.py
+141
-203
testCMFCategory.py
product/CMFCategory/tests/testCMFCategory.py
+3
-20
testAccounting.py
product/ERP5/tests/testAccounting.py
+2
-67
testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+1
-5
testAccountingRules.py
product/ERP5/tests/testAccountingRules.py
+4
-6
testAcknowledgementTool.py
product/ERP5/tests/testAcknowledgementTool.py
+1
-3
testAdvancedInvoicing.py
product/ERP5/tests/testAdvancedInvoicing.py
+2
-8
testAlarm.py
product/ERP5/tests/testAlarm.py
+4
-41
testAmount.py
product/ERP5/tests/testAmount.py
+2
-3
testApparelModel.py
product/ERP5/tests/testApparelModel.py
+0
-1
testApparelTransformation.py
product/ERP5/tests/testApparelTransformation.py
+0
-2
testAuthenticationPolicy.py
product/ERP5/tests/testAuthenticationPolicy.py
+1
-2
testAutoLogout.py
product/ERP5/tests/testAutoLogout.py
+0
-1
testBPMCore.py
product/ERP5/tests/testBPMCore.py
+0
-1
testBase.py
product/ERP5/tests/testBase.py
+5
-12
testBudget.py
product/ERP5/tests/testBudget.py
+3
-16
testBug.py
product/ERP5/tests/testBug.py
+0
-5
testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+3
-7
testCRM.py
product/ERP5/tests/testCRM.py
+2
-62
testCalendar.py
product/ERP5/tests/testCalendar.py
+2
-23
testComplexTradeModelLineUseCase.py
product/ERP5/tests/testComplexTradeModelLineUseCase.py
+12
-13
testContentTranslation.py
product/ERP5/tests/testContentTranslation.py
+0
-8
testContributionRegistryTool.py
product/ERP5/tests/testContributionRegistryTool.py
+0
-7
testConversionInSimulation.py
product/ERP5/tests/testConversionInSimulation.py
+1
-40
testCrmReports.py
product/ERP5/tests/testCrmReports.py
+1
-14
testDataProtection.py
product/ERP5/tests/testDataProtection.py
+0
-2
testDivergenceTester.py
product/ERP5/tests/testDivergenceTester.py
+1
-5
testDomainTool.py
product/ERP5/tests/testDomainTool.py
+1
-30
testERP5Administration.py
product/ERP5/tests/testERP5Administration.py
+0
-4
testERP5Base.py
product/ERP5/tests/testERP5Base.py
+2
-8
testERP5Category.py
product/ERP5/tests/testERP5Category.py
+4
-6
testERP5Commerce.py
product/ERP5/tests/testERP5Commerce.py
+0
-18
testERP5Coordinate.py
product/ERP5/tests/testERP5Coordinate.py
+1
-3
testERP5Core.py
product/ERP5/tests/testERP5Core.py
+4
-13
testERP5Credential.py
product/ERP5/tests/testERP5Credential.py
+3
-16
testERP5CurrencyExchangeLine.py
product/ERP5/tests/testERP5CurrencyExchangeLine.py
+1
-11
testERP5Discussion.py
product/ERP5/tests/testERP5Discussion.py
+1
-3
testERP5Simulation.py
product/ERP5/tests/testERP5Simulation.py
+0
-2
testERP5Web.py
product/ERP5/tests/testERP5Web.py
+1
-22
testERP5WebWithCRM.py
product/ERP5/tests/testERP5WebWithCRM.py
+0
-7
testERP5WebWithDms.py
product/ERP5/tests/testERP5WebWithDms.py
+2
-28
testERP5eGov.py
product/ERP5/tests/testERP5eGov.py
+3
-7
testEditorField.py
product/ERP5/tests/testEditorField.py
+1
-3
testExternalAccount.py
product/ERP5/tests/testExternalAccount.py
+0
-1
testFieldLibraryGuideline.py
product/ERP5/tests/testFieldLibraryGuideline.py
+1
-2
testICal.py
product/ERP5/tests/testICal.py
+0
-12
testIdTool.py
product/ERP5/tests/testIdTool.py
+0
-3
testIdToolUpgrade.py
product/ERP5/tests/testIdToolUpgrade.py
+1
-3
testImmobilisation.py
product/ERP5/tests/testImmobilisation.py
+2
-19
testInteractionWorkflow.py
product/ERP5/tests/testInteractionWorkflow.py
+3
-4
testIntrospectionTool.py
product/ERP5/tests/testIntrospectionTool.py
+0
-1
testInvalidationBug.py
product/ERP5/tests/testInvalidationBug.py
+3
-6
testInventory.py
product/ERP5/tests/testInventory.py
+3
-9
testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+3
-25
testInvoice.py
product/ERP5/tests/testInvoice.py
+1
-84
testItem.py
product/ERP5/tests/testItem.py
+2
-25
testKM.py
product/ERP5/tests/testKM.py
+3
-5
testMRP.py
product/ERP5/tests/testMRP.py
+0
-1
testMilestoneReporting.py
product/ERP5/tests/testMilestoneReporting.py
+0
-2
testNotificationMessageModule.py
product/ERP5/tests/testNotificationMessageModule.py
+1
-7
testNotificationTool.py
product/ERP5/tests/testNotificationTool.py
+1
-6
testOpenOrder.py
product/ERP5/tests/testOpenOrder.py
+0
-15
testOrder.py
product/ERP5/tests/testOrder.py
+0
-20
testOrderBuilder.py
product/ERP5/tests/testOrderBuilder.py
+0
-2
testPDM.py
product/ERP5/tests/testPDM.py
+0
-6
testPackingList.py
product/ERP5/tests/testPackingList.py
+1
-7
testPasswordTool.py
product/ERP5/tests/testPasswordTool.py
+1
-14
testPayroll.py
product/ERP5/tests/testPayroll.py
+1
-2
testPayroll_l10n_fr.py
product/ERP5/tests/testPayroll_l10n_fr.py
+1
-3
testPerson.py
product/ERP5/tests/testPerson.py
+0
-2
testPredicate.py
product/ERP5/tests/testPredicate.py
+0
-3
testProductionOrder.py
product/ERP5/tests/testProductionOrder.py
+0
-2
testProject.py
product/ERP5/tests/testProject.py
+1
-4
testQueryModule.py
product/ERP5/tests/testQueryModule.py
+1
-4
testRSS.py
product/ERP5/tests/testRSS.py
+1
-2
testResource.py
product/ERP5/tests/testResource.py
+5
-17
testResourceVariation.py
product/ERP5/tests/testResourceVariation.py
+1
-4
testReturnedSalePackingList.py
product/ERP5/tests/testReturnedSalePackingList.py
+4
-7
testRoundingTool.py
product/ERP5/tests/testRoundingTool.py
+0
-9
testRule.py
product/ERP5/tests/testRule.py
+0
-43
testSimulationPerformance.py
product/ERP5/tests/testSimulationPerformance.py
+9
-12
testSupply.py
product/ERP5/tests/testSupply.py
+0
-7
testTask.py
product/ERP5/tests/testTask.py
+1
-2
testTaskReporting.py
product/ERP5/tests/testTaskReporting.py
+1
-4
testTemplate.py
product/ERP5/tests/testTemplate.py
+4
-37
testTemplateTool.py
product/ERP5/tests/testTemplateTool.py
+5
-6
testTradeCondition.py
product/ERP5/tests/testTradeCondition.py
+1
-14
testTradeModelLine.py
product/ERP5/tests/testTradeModelLine.py
+5
-38
testTradeReports.py
product/ERP5/tests/testTradeReports.py
+1
-7
testTransformation.py
product/ERP5/tests/testTransformation.py
+3
-8
testTranslation.py
product/ERP5/tests/testTranslation.py
+1
-6
testWebCrawler.py
product/ERP5/tests/testWebCrawler.py
+0
-10
testWebDavSupport.py
product/ERP5/tests/testWebDavSupport.py
+0
-6
testWorklist.py
product/ERP5/tests/testWorklist.py
+2
-14
TestERP5BankingMixin.py
product/ERP5Banking/tests/TestERP5BankingMixin.py
+0
-2
testERP5BankingCheckPayment.py
product/ERP5Banking/tests/testERP5BankingCheckPayment.py
+3
-4
testERP5BankingCheckbookDelivery.py
...uct/ERP5Banking/tests/testERP5BankingCheckbookDelivery.py
+0
-2
testERP5BankingCheckbookUsualCashTransfer.py
...anking/tests/testERP5BankingCheckbookUsualCashTransfer.py
+0
-2
testERP5BankingCheckbookVaultTransfer.py
...RP5Banking/tests/testERP5BankingCheckbookVaultTransfer.py
+0
-2
testERP5BankingCounterDate.py
product/ERP5Banking/tests/testERP5BankingCounterDate.py
+1
-7
testERP5BankingTravelerCheckSale.py
...uct/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py
+0
-5
testArchive.py
product/ERP5Catalog/tests/testArchive.py
+1
-2
testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+53
-137
testERP5LdapCatalog.py
product/ERP5Catalog/tests/testERP5LdapCatalog.py
+1
-5
testFieldValueCache.py
product/ERP5Form/tests/testFieldValueCache.py
+0
-1
testFields.py
product/ERP5Form/tests/testFields.py
+0
-2
testGUIwithSecurity.py
product/ERP5Form/tests/testGUIwithSecurity.py
+2
-5
testListBox.py
product/ERP5Form/tests/testListBox.py
+2
-3
testOOoChart.py
product/ERP5Form/tests/testOOoChart.py
+0
-2
testPreferences.py
product/ERP5Form/tests/testPreferences.py
+11
-23
testProxyField.py
product/ERP5Form/tests/testProxyField.py
+2
-3
testLegacyBPMCore.py
product/ERP5Legacy/tests/testLegacyBPMCore.py
+1
-5
testLegacyConversionInSimulation.py
product/ERP5Legacy/tests/testLegacyConversionInSimulation.py
+1
-34
testLegacyDivergenceTester.py
product/ERP5Legacy/tests/testLegacyDivergenceTester.py
+1
-3
testLegacyInvoice.py
product/ERP5Legacy/tests/testLegacyInvoice.py
+1
-71
testLegacyOrder.py
product/ERP5Legacy/tests/testLegacyOrder.py
+0
-19
testLegacyPackingList.py
product/ERP5Legacy/tests/testLegacyPackingList.py
+1
-5
testLegacyProductionOrder.py
product/ERP5Legacy/tests/testLegacyProductionOrder.py
+0
-2
testLegacySimulationInvoice.py
product/ERP5Legacy/tests/testLegacySimulationInvoice.py
+1
-72
testLegacySimulationPackingList.py
product/ERP5Legacy/tests/testLegacySimulationPackingList.py
+1
-7
testLegacySimulationPerformance.py
product/ERP5Legacy/tests/testLegacySimulationPerformance.py
+2
-4
testLegacyTaxLineTradeCondition.py
product/ERP5Legacy/tests/testLegacyTaxLineTradeCondition.py
+16
-30
testLegacyTradeCondition.py
product/ERP5Legacy/tests/testLegacyTradeCondition.py
+1
-14
testLegacyTradeModelLine.py
product/ERP5Legacy/tests/testLegacyTradeModelLine.py
+4
-4
testDeferredStyle.py
product/ERP5OOo/tests/testDeferredStyle.py
+0
-4
testDms.py
product/ERP5OOo/tests/testDms.py
+14
-40
testFormPrintoutAsODG.py
product/ERP5OOo/tests/testFormPrintoutAsODG.py
+0
-5
testFormPrintoutAsODT.py
product/ERP5OOo/tests/testFormPrintoutAsODT.py
+0
-3
testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+6
-46
testOOoConversionCache.py
product/ERP5OOo/tests/testOOoConversionCache.py
+8
-22
testOOoImport.py
product/ERP5OOo/tests/testOOoImport.py
+0
-15
testOOoStyle.py
product/ERP5OOo/tests/testOOoStyle.py
+1
-3
testERP5Security.py
product/ERP5Security/tests/testERP5Security.py
+13
-24
testERP5DocumentSyncML.py
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
+1
-32
testERP5SyncML.py
product/ERP5SyncML/tests/testERP5SyncML.py
+0
-18
testERP5SyncMLVCard.py
product/ERP5SyncML/tests/testERP5SyncMLVCard.py
+0
-4
testBusinessTemplateInstallation.py
...uct/ERP5TioSafe/tests/testBusinessTemplateInstallation.py
+0
-2
testPersonERP5Synchronization.py
product/ERP5TioSafe/tests/testPersonERP5Synchronization.py
+0
-9
testPersonPrestashopSynchronization.py
.../ERP5TioSafe/tests/testPersonPrestashopSynchronization.py
+0
-8
testPrestashopMixin.py
product/ERP5TioSafe/tests/testPrestashopMixin.py
+0
-2
testProductERP5Synchronization.py
product/ERP5TioSafe/tests/testProductERP5Synchronization.py
+0
-9
testProductPrestashopSynchronization.py
...ERP5TioSafe/tests/testProductPrestashopSynchronization.py
+0
-13
testSaleOrderERP5Synchronization.py
...uct/ERP5TioSafe/tests/testSaleOrderERP5Synchronization.py
+0
-14
testTioSafeMixin.py
product/ERP5TioSafe/tests/testTioSafeMixin.py
+2
-6
ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+2
-3
ERP5TypeLiveTestCase.py
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
+2
-2
ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+10
-12
ProcessingNodeTestCase.py
product/ERP5Type/tests/ProcessingNodeTestCase.py
+12
-1
SecurityTestCase.py
product/ERP5Type/tests/SecurityTestCase.py
+1
-2
Sequence.py
product/ERP5Type/tests/Sequence.py
+1
-2
testCacheTool.py
product/ERP5Type/tests/testCacheTool.py
+10
-11
testCachedSkinsTool.py
product/ERP5Type/tests/testCachedSkinsTool.py
+1
-1
testClassTool.py
product/ERP5Type/tests/testClassTool.py
+4
-6
testConstraint.py
product/ERP5Type/tests/testConstraint.py
+2
-5
testCopySupport.py
product/ERP5Type/tests/testCopySupport.py
+4
-9
testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+29
-60
testERP5Type.py
product/ERP5Type/tests/testERP5Type.py
+36
-50
testFolder.py
product/ERP5Type/tests/testFolder.py
+7
-8
testFolderMigration.py
product/ERP5Type/tests/testFolderMigration.py
+3
-29
testFunctionalCore.py
product/ERP5Type/tests/testFunctionalCore.py
+0
-1
testFunctionalKM.py
product/ERP5Type/tests/testFunctionalKM.py
+0
-1
testFunctionalStandaloneUserTutorial.py
...ct/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py
+0
-1
testMemcachedTool.py
product/ERP5Type/tests/testMemcachedTool.py
+4
-6
testPerformance.py
product/ERP5Type/tests/testPerformance.py
+2
-8
testSessionTool.py
product/ERP5Type/tests/testSessionTool.py
+2
-3
testTransactionalVariable.py
product/ERP5Type/tests/testTransactionalVariable.py
+2
-3
testXMLMatrix.py
product/ERP5Type/tests/testXMLMatrix.py
+10
-25
utils.py
product/ERP5Type/tests/utils.py
+0
-4
testERP5RemoteUserManager.py
product/ERP5Wizard/tests/testERP5RemoteUserManager.py
+1
-18
testDeferredConnection.py
product/ZMySQLDDA/tests/testDeferredConnection.py
+5
-6
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
View file @
8995b645
...
...
@@ -29,7 +29,6 @@
import
os
import
transaction
from
DateTime
import
DateTime
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
...
...
@@ -795,7 +794,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
delivery
.
confirm
()
delivery
.
start
()
delivery
.
stop
()
transaction
.
commit
()
self
.
tic
()
# inventories of that resource are index in grams
...
...
bt5/erp5_configurator_standard/bt/revision
View file @
8995b645
637
\ No newline at end of file
638
\ No newline at end of file
bt5/erp5_egov/TestTemplateItem/TestEGovMixin.py
View file @
8995b645
...
...
@@ -34,7 +34,6 @@ from AccessControl import Unauthorized
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.Sequence
import
Step
,
Sequence
,
SequenceList
from
zLOG
import
LOG
import
transaction
import
random
import
email
from
email.header
import
decode_header
,
make_header
...
...
@@ -80,7 +79,7 @@ class TestEGovMixin(SecurityTestCase):
for
idx
,
step
in
enumerate
(
self
.
_step_list
):
step
.
play
(
context
,
sequence
=
self
,
quiet
=
quiet
)
# commit transaction after each step
transaction
.
commit
()
self
.
commit
()
Sequence
.
play
=
play
def
play
(
self
,
context
,
sequence
=
None
,
quiet
=
0
):
...
...
@@ -139,7 +138,6 @@ class TestEGovMixin(SecurityTestCase):
self
.
portal
.
__class__
.
DeclarationTVA_zGetSIGTASInformation
\
=
lambda
x
,
**
kw
:
[]
transaction
.
commit
()
self
.
tic
()
def
beforeTearDown
(
self
):
...
...
@@ -148,7 +146,6 @@ class TestEGovMixin(SecurityTestCase):
# we want to keep some IDs
module
.
manage_delObjects
([
x
for
x
in
module
.
objectIds
()
if
x
not
in
(
'EUR'
,)])
transaction
.
commit
()
self
.
tic
()
def
getUserFolder
(
self
)
:
...
...
@@ -200,7 +197,6 @@ class TestEGovMixin(SecurityTestCase):
'group/dgid/di/csf/bf'
)
# make this available to catalog
transaction
.
commit
()
self
.
tic
()
def
createOneOrganisation
(
self
,
username
,
role
=
None
,
function
=
None
,
...
...
@@ -232,7 +228,6 @@ class TestEGovMixin(SecurityTestCase):
role
=
'entreprise/siege'
)
# make this available to catalog
transaction
.
commit
()
self
.
tic
()
def
checkRights
(
self
,
object_list
,
security_mapping
,
username
):
...
...
bt5/erp5_egov/bt/revision
View file @
8995b645
758
\ No newline at end of file
759
\ No newline at end of file
bt5/erp5_forum_tutorial/TestTemplateItem/testDiscussionThread.py
View file @
8995b645
from
Products.ERP5Type.tests.SecurityTestCase
import
SecurityTestCase
import
transaction
from
httplib
import
OK
as
HTTP_OK
class
TestDiscussionThread
(
SecurityTestCase
):
...
...
@@ -109,7 +108,6 @@ class TestDiscussionThread(SecurityTestCase):
self
.
assertUserCanViewDocument
(
'forum_user'
,
post
)
self
.
assertUserCanAccessDocument
(
'forum_user'
,
post
)
transaction
.
commit
()
self
.
tic
()
thread_posts
=
thread
.
objectValues
()
...
...
@@ -180,7 +178,7 @@ class TestDiscussionThread(SecurityTestCase):
self
.
assertUserCanPassWorkflowTransition
(
'admin'
,
'close_action'
,
thread
)
thread
.
close
()
transaction
.
commit
()
self
.
commit
()
self
.
assertUserCanViewDocument
(
'admin'
,
thread
)
self
.
assertUserCanAccessDocument
(
'admin'
,
thread
)
...
...
bt5/erp5_forum_tutorial/bt/revision
View file @
8995b645
3
\ No newline at end of file
4
\ No newline at end of file
bt5/erp5_ingestion/TestTemplateItem/testLiveIngestion.py
View file @
8995b645
...
...
@@ -34,7 +34,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeLiveTestCase
from
zLOG
import
LOG
,
INFO
,
ERROR
from
Products.CMFCore.utils
import
getToolByName
import
transaction
import
random
import
string
...
...
@@ -85,7 +84,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
document_parent
=
document
.
getParentValue
()
document_parent
.
_delObject
(
doucument_id
)
# Unindex deleted documents
transaction
.
commit
()
self
.
tic
()
def
setSystemPreference
(
self
):
...
...
@@ -121,7 +119,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
script_id
=
'ERP5Site_getTextFileWithFileName'
filename
=
'any_file.txt'
document
=
self
.
contributeFileWithUrl
(
script_id
,
filename
=
filename
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
document
.
getPortalType
(),
'Text'
)
self
.
assertEquals
(
document
.
getFilename
(),
filename
)
...
...
@@ -135,7 +132,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
"""
script_id
=
'ERP5Site_getTextFile.txt'
document
=
self
.
contributeFileWithUrl
(
script_id
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
document
.
getPortalType
(),
'Text'
)
self
.
assertEquals
(
document
.
getFilename
(),
script_id
)
...
...
@@ -148,7 +144,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
"""
script_id
=
'ERP5Site_getTextFileWithoutContentType.txt'
document
=
self
.
contributeFileWithUrl
(
script_id
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
document
.
getPortalType
(),
'Text'
)
self
.
assertEquals
(
document
.
getFilename
(),
script_id
)
...
...
@@ -162,7 +157,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
script_id
=
'ERP5Site_getTextFileWithFileNameAndRedirection'
filename
=
'any_file.txt'
document
=
self
.
contributeFileWithUrl
(
script_id
,
filename
=
filename
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
document
.
getPortalType
(),
'Text'
)
self
.
assertEquals
(
document
.
getFilename
(),
filename
)
...
...
@@ -176,7 +170,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
"""
script_id
=
'ERP5Site_getTextFileWithoutFileNameButHTMLContentType'
document
=
self
.
contributeFileWithUrl
(
script_id
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
document
.
getPortalType
(),
'Web Page'
)
self
.
assertEquals
(
document
.
getFilename
(),
script_id
)
...
...
bt5/erp5_ingestion/bt/revision
View file @
8995b645
140
\ No newline at end of file
141
\ No newline at end of file
bt5/erp5_inotify/TestTemplateItem/testInotifyTool.py
View file @
8995b645
...
...
@@ -27,7 +27,6 @@
##############################################################################
import
os
,
shutil
,
tempfile
,
unittest
import
transaction
from
Acquisition
import
aq_base
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
...
@@ -45,7 +44,7 @@ class TestInotifyTool(ERP5TypeTestCase):
for
inotify
in
inotify_tool
.
objectValues
():
inotify
.
_setEnabled
(
False
)
inotify_tool
.
_p_changed
=
1
transaction
.
commit
()
self
.
commit
()
def
checkCache
(
notify_list
):
self
.
assertEqual
(
notify_list
,
getattr
(
aq_base
(
inotify_tool
),
'_v_notify_list'
,
None
))
...
...
@@ -53,7 +52,7 @@ class TestInotifyTool(ERP5TypeTestCase):
tmp_dir
=
tempfile
.
mkdtemp
()
try
:
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
checkCache
([])
inotify
=
inotify_tool
.
newContent
(
inode_path
=
'string:'
+
tmp_dir
,
sense_method_id
=
'Inotify_test'
,
...
...
@@ -61,34 +60,34 @@ class TestInotifyTool(ERP5TypeTestCase):
inotify_id
=
inotify
.
getId
()
checkCache
(
None
)
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
checkCache
([])
event_list
=
[]
inotify
.
__class__
.
Inotify_test
=
lambda
self
,
events
:
\
event_list
.
extend
(
events
)
try
:
inotify
.
setEnabled
(
True
)
transaction
.
commit
()
self
.
commit
()
checkCache
(
None
)
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
checkCache
([
inotify_id
])
self
.
assertEqual
(
event_list
,
[])
p
=
os
.
path
.
join
(
tmp_dir
,
'1'
)
with
open
(
p
,
'w'
)
as
f
:
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
self
.
assertEqual
(
event_list
,
[{
'path'
:
p
,
'mask'
:
IN_CREATE
}])
del
event_list
[:]
f
.
write
(
'foo'
)
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
self
.
assertEqual
(
event_list
,
[{
'path'
:
p
,
'mask'
:
IN_MODIFY
}])
del
event_list
[:]
p2
=
os
.
path
.
join
(
tmp_dir
,
'2'
)
os
.
rename
(
p
,
p2
)
inotify_tool
.
process_timer
(
None
,
None
)
transaction
.
commit
()
self
.
commit
()
expected
=
[{
'path'
:
p
,
'mask'
:
IN_DELETE
},
{
'path'
:
p2
,
'mask'
:
IN_CREATE
}]
expected
.
remove
(
event_list
.
pop
())
...
...
bt5/erp5_inotify/bt/revision
View file @
8995b645
3
\ No newline at end of file
4
\ No newline at end of file
bt5/erp5_social_contracts/TestTemplateItem/testERP5SocialContracts.py
View file @
8995b645
...
...
@@ -27,10 +27,7 @@
##############################################################################
import
unittest
import
transaction
from
DateTime
import
DateTime
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
...
@@ -55,19 +52,17 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
title
=
'Person3'
)
def
beforeTearDown
(
self
):
transaction
.
begin
()
self
.
abort
()
self
.
portal
.
person_module
.
manage_delObjects
(
list
(
self
.
portal
.
person_module
.
objectIds
()))
self
.
portal
.
social_contract_module
.
manage_delObjects
(
list
(
self
.
portal
.
social_contract_module
.
objectIds
()))
transaction
.
commit
()
self
.
tic
()
def
test_getChildCount
(
self
):
self
.
assertEquals
(
0
,
self
.
person_1
.
Person_getChildCount
())
self
.
person_2
.
setNaturalParentValue
(
self
.
person_1
)
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
1
,
self
.
person_1
.
Person_getChildCount
())
...
...
@@ -83,7 +78,6 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
start_date
=
'2001-01-01'
)
contract_1
.
setDestinationValueList
((
self
.
person_1
,
self
.
person_2
))
contract_1
.
validate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
1
,
self
.
person_1
.
Person_getPartnerCount
())
...
...
@@ -94,7 +88,6 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
contract_2
.
setStopDate
(
'3000-01-01'
)
contract_2
.
validate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
2
,
self
.
person_1
.
Person_getPartnerCount
())
...
...
bt5/erp5_social_contracts/bt/revision
View file @
8995b645
24
\ No newline at end of file
25
\ No newline at end of file
bt5/erp5_tiosafe_oxatis_test/TestTemplateItem/testOxatisSynchronization.py
View file @
8995b645
...
...
@@ -27,7 +27,6 @@
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
import
transaction
import
unittest
from
zLOG
import
LOG
from
Testing
import
ZopeTestCase
...
...
@@ -107,7 +106,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
if
sync
.
getValidationState
()
!=
"validated"
:
sync
.
validate
()
transaction
.
commit
()
self
.
tic
()
def
beforeTearDown
(
self
):
...
...
@@ -117,7 +115,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
for
connector
in
self
.
oxatis
.
contentValues
(
portal_type
=
"Web Service Connector"
):
# use the test connector
connector
.
setTransport
(
"oxatis"
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -127,12 +124,10 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
for
im
in
[
'organisation_module'
,
'delivered_organisation_module'
,
'person_module'
,
'delivered_person_module'
,]:
LOG
(
"RUNNING SYNCHRO FOR
%
s"
%
(
im
),
300
,
""
)
transaction
.
commit
()
self
.
tic
()
self
.
oxatis
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
im
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
if
conflict_dict
and
conflict_dict
.
has_key
(
im
):
nb_pub_conflict
,
nb_sub_conflict
,
in_conflict
=
conflict_dict
[
im
]
...
...
@@ -165,12 +160,10 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
def
_runAndCheckResourceSynchronization
(
self
,
reset
=
True
):
# run synchronization
transaction
.
commit
()
self
.
tic
()
self
.
oxatis
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
'product_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
# Check fix point
for
im
in
[
'product_module'
]:
...
...
@@ -219,7 +212,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
else
:
if
person
.
getValidationState
()
==
"validated"
:
person
.
invalidate
()
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
self
.
portal
.
oxatis_test_module
.
contentValues
(
portal_type
=
"Oxatis Test Person"
)),
6
)
...
...
@@ -454,7 +446,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
# Delete products
prod_ids
=
[
x
for
x
in
self
.
portal
.
product_module
.
objectIds
()
if
x
!=
self
.
default_resource_id
]
self
.
portal
.
product_module
.
manage_delObjects
(
prod_ids
)
transaction
.
commit
()
self
.
tic
()
# Check initial data
for
product
in
self
.
portal
.
oxatis_test_module
.
contentValues
(
portal_type
=
"Oxatis Test Product"
):
...
...
@@ -464,7 +455,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
else
:
if
product
.
getValidationState
()
==
"validated"
:
product
.
invalidate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEqual
(
len
(
self
.
portal
.
oxatis_test_module
.
searchFolder
(
portal_type
=
"Oxatis Test Product"
,
...
...
@@ -502,7 +492,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
for
product
in
self
.
portal
.
oxatis_test_module
.
contentValues
(
portal_type
=
"Oxatis Test Product"
):
if
product
.
getValidationState
()
!=
"validated"
:
product
.
validate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEqual
(
len
(
self
.
portal
.
oxatis_test_module
.
searchFolder
(
portal_type
=
"Oxatis Test Product"
,
...
...
@@ -545,7 +534,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
self
.
portal
.
sale_order_module
.
manage_delObjects
(
so_ids
)
# Define date on integration site
self
.
oxatis
.
edit
(
stop_date
=
"2010/12/01"
)
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
self
.
portal
.
oxatis_test_module
.
contentValues
(
portal_type
=
"Oxatis Test Sale Order"
)),
2
)
...
...
@@ -558,7 +546,6 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
# run synchronization
self
.
oxatis
.
IntegrationSite_synchronize
(
reset
=
True
,
synchronization_list
=
[
'sale_order_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
# Check fix point
...
...
@@ -594,14 +581,12 @@ class TestOxatisSynchronization(ERP5TypeTestCase):
# Change date
self
.
oxatis
.
edit
(
stop_date
=
"2010/12/31"
)
transaction
.
commit
()
self
.
tic
()
# run synchronization
self
.
oxatis
.
IntegrationSite_synchronize
(
reset
=
False
,
synchronization_list
=
[
'sale_order_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
self
.
checkConflicts
(
'sale_order_module'
)
# Check fix point
...
...
bt5/erp5_tiosafe_oxatis_test/bt/revision
View file @
8995b645
71
\ No newline at end of file
72
\ No newline at end of file
bt5/erp5_tiosafe_ubercart_test/TestTemplateItem/testUbercartSynchronisation.py
View file @
8995b645
...
...
@@ -27,7 +27,6 @@
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
import
transaction
import
unittest
from
zLOG
import
LOG
from
Testing
import
ZopeTestCase
...
...
@@ -105,7 +104,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
if
sync
.
getValidationState
()
!=
"validated"
:
sync
.
validate
()
transaction
.
commit
()
self
.
tic
()
def
beforeTearDown
(
self
):
...
...
@@ -115,7 +113,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
for
connector
in
self
.
ubercart
.
contentValues
(
portal_type
=
"Web Service Connector"
):
# use the test connector
connector
.
setTransport
(
"ubercart"
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -125,12 +122,10 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
for
im
in
[
'organisation_module'
,
'delivered_organisation_module'
,
\
'person_module'
,
'delivered_person_module'
]:
LOG
(
"RUNNING SYNCHRO FOR
%
s"
%
(
im
),
300
,
""
)
transaction
.
commit
()
self
.
tic
()
self
.
ubercart
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
im
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
if
conflict_dict
and
conflict_dict
.
has_key
(
im
):
nb_pub_conflict
,
nb_sub_conflict
,
in_conflict
=
conflict_dict
[
im
]
...
...
@@ -155,13 +150,11 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
def
_runAndCheckResourceSynchronization
(
self
,
reset
=
True
,
conflict_dict
=
None
):
# run synchronization
transaction
.
commit
()
self
.
tic
()
LOG
(
"RUNNING SYNCHRO FOR product_module"
,
300
,
""
)
self
.
ubercart
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
'product_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
# Check fix point
for
im
in
[
'product_module'
,]:
...
...
@@ -212,7 +205,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
if
person
.
getId
()
!=
self
.
default_node_id
and
person
.
getValidationState
()
!=
"validated"
:
person
.
validate
()
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
ubercart_test_module
.
contentValues
(
portal_type
=
"Ubercart Test Person"
)),
2
)
...
...
@@ -391,13 +383,11 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
prod_ids
=
[
x
for
x
in
self
.
portal
.
product_module
.
objectIds
()
if
x
!=
self
.
default_resource_id
]
self
.
portal
.
product_module
.
manage_delObjects
(
prod_ids
)
transaction
.
commit
()
self
.
tic
()
# Check initial data
for
product
in
self
.
portal
.
ubercart_test_module
.
contentValues
(
portal_type
=
"Ubercart Test Product"
):
if
product
.
getValidationState
()
!=
"validated"
:
product
.
validate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEqual
(
len
(
self
.
portal
.
ubercart_test_module
.
contentValues
(
portal_type
=
"Ubercart Test Product"
,
...
...
@@ -463,7 +453,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
if
product_test
.
getTitle
()
==
"Fleure"
:
flower_test
=
product_test
flower_test
.
objectValues
()[
0
]
.
setCategory
(
"Catalog/Fleure/Rose"
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -485,7 +474,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
if
flower
is
not
None
and
flower_test
is
not
None
:
deleted_cat_list
=
[
c
.
getId
()
for
c
in
flower_test
.
objectValues
()]
flower_test
.
manage_delObjects
(
deleted_cat_list
)
transaction
.
commit
()
self
.
tic
()
tiosafe_category_list
=
flower
.
contentValues
()
plugin_category_list
=
flower_test
.
contentValues
()
...
...
@@ -507,7 +495,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
piv
=
flower
.
newContent
(
portal_type
=
"Product Individual Variation"
)
piv
.
setTitle
(
"Fleure/Calice"
)
piv
.
setVariationBaseCategory
(
"collection"
)
transaction
.
commit
()
self
.
tic
()
if
flower
is
not
None
and
flower_test
is
not
None
:
...
...
@@ -533,7 +520,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
if
flower
is
not
None
and
flower_test
is
not
None
:
flower
.
objectValues
()[
0
]
.
setTitle
(
"Fleure/Samanta/Ndiondome"
)
flower
.
objectValues
()[
0
]
.
setVariationBaseCategory
(
"collection"
)
transaction
.
commit
()
self
.
tic
()
category
=
flower
.
objectValues
()[
0
]
.
getTitle
()
category_test
=
flower_test
.
objectValues
()[
0
]
.
getCategory
()
...
...
@@ -603,7 +589,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
self
.
portal
.
sale_order_module
.
manage_delObjects
(
so_ids
)
# Define date on integration site
self
.
ubercart
.
edit
(
stop_date
=
"2010/12/01"
)
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
self
.
portal
.
ubercart_test_module
.
contentValues
(
portal_type
=
"Ubercart Test Sale Order"
)),
1
)
...
...
@@ -616,7 +601,6 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
# run synchronization
self
.
ubercart
.
IntegrationSite_synchronize
(
reset
=
True
,
synchronization_list
=
[
'sale_order_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
# Check fix point
...
...
@@ -650,13 +634,11 @@ class TestUbercartSynchronization(ERP5TypeTestCase):
self
.
assertNotEqual
(
sale_order
.
getDestinationAdministration
(),
None
)
# Change date
self
.
ubercart
.
edit
(
stop_date
=
"2010/10/31"
)
transaction
.
commit
()
self
.
tic
()
# run synchronization
self
.
ubercart
.
IntegrationSite_synchronize
(
reset
=
False
,
synchronization_list
=
[
'sale_order_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
self
.
checkConflicts
(
'sale_order_module'
)
# Check fix point
...
...
bt5/erp5_tiosafe_ubercart_test/bt/revision
View file @
8995b645
31
\ No newline at end of file
32
\ No newline at end of file
bt5/erp5_tiosafe_virtuemart_test/TestTemplateItem/testVirtuemartSynchronization.py
View file @
8995b645
...
...
@@ -27,7 +27,6 @@
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
import
transaction
import
unittest
from
zLOG
import
LOG
from
Testing
import
ZopeTestCase
...
...
@@ -106,7 +105,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
if
sync
.
getValidationState
()
!=
"validated"
:
sync
.
validate
()
transaction
.
commit
()
self
.
tic
()
def
beforeTearDown
(
self
):
...
...
@@ -116,7 +114,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
for
connector
in
self
.
virtuemart
.
contentValues
(
portal_type
=
"Web Service Connector"
):
# use the test connector
connector
.
setTransport
(
"virtuemart"
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -130,12 +127,10 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
node_module_list
=
[
'person_module'
,
'delivered_person_module'
,]
for
im
in
node_module_list
:
LOG
(
"RUNNING SYNCHRO FOR
%
s"
%
(
im
),
300
,
""
)
transaction
.
commit
()
self
.
tic
()
self
.
virtuemart
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
im
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
if
conflict_dict
and
conflict_dict
.
has_key
(
im
):
nb_pub_conflict
,
nb_sub_conflict
,
in_conflict
=
conflict_dict
[
im
]
...
...
@@ -161,12 +156,10 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
def
_runAndCheckResourceSynchronization
(
self
,
conflict_dict
=
None
,
reset
=
True
):
# run synchronization
transaction
.
commit
()
self
.
tic
()
self
.
virtuemart
.
IntegrationSite_synchronize
(
reset
=
reset
,
synchronization_list
=
[
'product_module'
,],
batch_mode
=
True
)
transaction
.
commit
()
self
.
tic
()
# Check fix point
for
im
in
[
'product_module'
]:
...
...
@@ -216,7 +209,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
if
organisation
.
getValidationState
()
!=
"validated"
:
organisation
.
validate
()
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
self
.
portal
.
virtuemart_test_module
.
contentValues
(
portal_type
=
"Virtuemart Test Organisation"
)),
3
)
...
...
@@ -376,7 +368,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
if
person
.
getValidationState
()
!=
"validated"
:
person
.
validate
()
transaction
.
commit
()
self
.
tic
()
# Check initial data
self
.
assertEqual
(
len
(
self
.
portal
.
virtuemart_test_module
.
contentValues
(
portal_type
=
"Virtuemart Test Person"
)),
4
)
...
...
@@ -500,8 +491,7 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
for person in self.portal.virtuemart_test_module.contentValues(portal_type="Virtuemart Test Person"):
if person.getTitle() == "Simple person":
person.edit(city=person_in_orga_update_dict['city'])
transaction.commit()
self.tic()
self.tic()
#self._runAndCheckNodeSynchronization(reset=False)
...
...
@@ -559,7 +549,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
elif
product
.
getValidationState
()
!=
'validated'
:
product
.
validate
()
transaction
.
commit
()
self
.
tic
()
# Check initial data
...
...
@@ -567,7 +556,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
if
product
.
getValidationState
()
!=
"validated"
:
product
.
validate
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEqual
(
len
(
self
.
portal
.
virtuemart_test_module
.
contentValues
(
portal_type
=
"Virtuemart Test Product"
,
...
...
@@ -637,7 +625,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
new_product = self.portal.product_module.newContent(portal_type='Product')
new_product.edit(**erp5_new_product)
new_product.validate()
transaction.commit()
self.tic()
# add to sale supply
...
...
@@ -671,7 +658,6 @@ class TestVirtuemartSynchronization(ERP5TypeTestCase):
if
product
.
getReference
()
==
"PRDNew"
:
if
product
.
getValidationState
()
==
"validated"
: