Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xueyun Qian
erp5
Commits
355cc80e
Commit
355cc80e
authored
Oct 18, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Promise magic to configure cloudooo, memcached and kumofs.
parent
061549e4
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
107 additions
and
250 deletions
+107
-250
bt5/erp5_configurator_run_my_doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
...doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
+2
-11
bt5/erp5_configurator_run_my_doc/bt/revision
bt5/erp5_configurator_run_my_doc/bt/revision
+1
-1
bt5/erp5_configurator_ung/TestTemplateItem/testUNGConfigurationWorkflow.py
...ator_ung/TestTemplateItem/testUNGConfigurationWorkflow.py
+2
-11
bt5/erp5_configurator_ung/bt/revision
bt5/erp5_configurator_ung/bt/revision
+1
-1
bt5/erp5_ingestion/TestTemplateItem/testLiveIngestion.py
bt5/erp5_ingestion/TestTemplateItem/testLiveIngestion.py
+6
-10
bt5/erp5_ingestion/bt/revision
bt5/erp5_ingestion/bt/revision
+1
-1
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
+3
-7
bt5/erp5_web_ung_theme/bt/revision
bt5/erp5_web_ung_theme/bt/revision
+1
-1
product/ERP5/tests/testBase.py
product/ERP5/tests/testBase.py
+4
-13
product/ERP5/tests/testCRM.py
product/ERP5/tests/testCRM.py
+11
-11
product/ERP5/tests/testERP5WebWithCRM.py
product/ERP5/tests/testERP5WebWithCRM.py
+3
-21
product/ERP5/tests/testERP5WebWithDms.py
product/ERP5/tests/testERP5WebWithDms.py
+4
-13
product/ERP5/tests/testKM.py
product/ERP5/tests/testKM.py
+1
-0
product/ERP5/tests/testWebCrawler.py
product/ERP5/tests/testWebCrawler.py
+9
-22
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
+13
-19
product/ERP5Configurator/tests/testConfiguratorItem.py
product/ERP5Configurator/tests/testConfiguratorItem.py
+1
-0
product/ERP5Configurator/tests/testConfiguratorTool.py
product/ERP5Configurator/tests/testConfiguratorTool.py
+1
-0
product/ERP5OOo/tests/TestFormPrintoutMixin.py
product/ERP5OOo/tests/TestFormPrintoutMixin.py
+2
-9
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+6
-30
product/ERP5OOo/tests/testDmsWithFlare.py
product/ERP5OOo/tests/testDmsWithFlare.py
+5
-8
product/ERP5OOo/tests/testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+4
-7
product/ERP5OOo/tests/testOOoImport.py
product/ERP5OOo/tests/testOOoImport.py
+6
-9
product/ERP5OOo/tests/testOOoStyle.py
product/ERP5OOo/tests/testOOoStyle.py
+3
-13
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
+7
-10
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+1
-0
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+2
-3
product/ERP5Type/tests/testCacheTool.py
product/ERP5Type/tests/testCacheTool.py
+7
-19
No files found.
bt5/erp5_configurator_run_my_doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
View file @
355cc80e
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
#
#
##############################################################################
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Configurator.tests.ConfiguratorTestMixin
import
\
from
Products.ERP5Configurator.tests.ConfiguratorTestMixin
import
\
TestLiveConfiguratorWorkflowMixin
TestLiveConfiguratorWorkflowMixin
...
@@ -85,7 +84,8 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -85,7 +84,8 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
"""
"""
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_workflow'
,
'erp5_workflow'
,
...
@@ -191,15 +191,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -191,15 +191,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
person_config_item
=
person_config_save
[
"3"
]
person_config_item
=
person_config_save
[
"3"
]
self
.
assertEquals
(
person_config_item
.
getReference
(),
"french_assignor"
)
self
.
assertEquals
(
person_config_item
.
getReference
(),
"french_assignor"
)
def
stepCheckSystemPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check System Preference"""
system_preference
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"System Preference"
)
conversion_dict
=
_getConversionServerDict
()
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerPortNumber
(),
conversion_dict
[
'port'
])
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerAddress
(),
conversion_dict
[
'hostname'
])
def
stepCheckUserPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepCheckUserPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check System Preference"""
""" Check System Preference"""
portal_catalog
=
self
.
portal
.
portal_catalog
portal_catalog
=
self
.
portal
.
portal_catalog
...
...
bt5/erp5_configurator_run_my_doc/bt/revision
View file @
355cc80e
8
9
\ No newline at end of file
\ No newline at end of file
bt5/erp5_configurator_ung/TestTemplateItem/testUNGConfigurationWorkflow.py
View file @
355cc80e
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#
#
##############################################################################
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Configurator.tests.ConfiguratorTestMixin
import
\
from
Products.ERP5Configurator.tests.ConfiguratorTestMixin
import
\
TestLiveConfiguratorWorkflowMixin
TestLiveConfiguratorWorkflowMixin
...
@@ -105,7 +104,8 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -105,7 +104,8 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
"""
"""
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_workflow'
,
'erp5_workflow'
,
...
@@ -217,15 +217,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -217,15 +217,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
response_dict
=
sequence
.
get
(
"response_dict"
)
response_dict
=
sequence
.
get
(
"response_dict"
)
self
.
assertEquals
(
'show'
,
response_dict
[
'command'
])
self
.
assertEquals
(
'show'
,
response_dict
[
'command'
])
def
stepCheckSystemPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check System Preference"""
system_preference
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"System Preference"
)
conversion_dict
=
_getConversionServerDict
()
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerPortNumber
(),
conversion_dict
[
'port'
])
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerAddress
(),
conversion_dict
[
'hostname'
])
def
stepCheckUserPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepCheckUserPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check System Preference"""
""" Check System Preference"""
portal_catalog
=
self
.
portal
.
portal_catalog
portal_catalog
=
self
.
portal
.
portal_catalog
...
...
bt5/erp5_configurator_ung/bt/revision
View file @
355cc80e
58
59
\ No newline at end of file
\ No newline at end of file
bt5/erp5_ingestion/TestTemplateItem/testLiveIngestion.py
View file @
355cc80e
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
import
unittest
import
unittest
import
os
import
os
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeLiveTestCase
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeLiveTestCase
from
zLOG
import
LOG
,
INFO
,
ERROR
from
zLOG
import
LOG
,
INFO
,
ERROR
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
...
@@ -58,7 +57,8 @@ class TestIngestion(ERP5TypeLiveTestCase):
...
@@ -58,7 +57,8 @@ class TestIngestion(ERP5TypeLiveTestCase):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_base'
,
return
(
'erp5_promise'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_web'
,
'erp5_web'
,
...
@@ -87,15 +87,11 @@ class TestIngestion(ERP5TypeLiveTestCase):
...
@@ -87,15 +87,11 @@ class TestIngestion(ERP5TypeLiveTestCase):
self
.
tic
()
self
.
tic
()
def
setSystemPreference
(
self
):
def
setSystemPreference
(
self
):
portal_preferences
=
getToolByName
(
self
.
portal
,
'portal_preferences'
)
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
default_pref
=
portal_preferences
.
default_site_preference
self
.
tic
()
conversion_dict
=
_getConversionServerDict
()
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
default_pref
.
setPreferredDocumentFileNameRegularExpression
(
FILE_NAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
def
contributeFileWithUrl
(
self
,
script_id
,
filename
=
None
):
def
contributeFileWithUrl
(
self
,
script_id
,
filename
=
None
):
"""compute url and call portal_contributions.newContentFromUrl
"""compute url and call portal_contributions.newContentFromUrl
...
...
bt5/erp5_ingestion/bt/revision
View file @
355cc80e
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
View file @
355cc80e
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
DateTime
import
DateTime
from
DateTime
import
DateTime
import
os.path
import
os.path
import
Products.ERP5.tests
import
Products.ERP5.tests
...
@@ -45,7 +44,8 @@ class TestUNG(ERP5TypeTestCase):
...
@@ -45,7 +44,8 @@ class TestUNG(ERP5TypeTestCase):
return
"UNG Tests"
return
"UNG Tests"
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_ingestion_mysql_innodb_catalog'
,
return
(
'erp5_promise'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_jquery'
,
'erp5_jquery'
,
...
@@ -523,11 +523,7 @@ class TestUNG(ERP5TypeTestCase):
...
@@ -523,11 +523,7 @@ class TestUNG(ERP5TypeTestCase):
portal_preferences
=
portal
.
portal_preferences
portal_preferences
=
portal
.
portal_preferences
web_page_module
=
portal
.
web_page_module
web_page_module
=
portal
.
web_page_module
portal_contributions
=
portal
.
portal_contributions
portal_contributions
=
portal
.
portal_contributions
system_preference
=
portal_preferences
.
newContent
(
portal_type
=
'System Preference'
)
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
system_preference
.
setPreferredOoodocServerAddress
(
conversion_dict
[
"hostname"
])
system_preference
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
"port"
])
system_preference
.
enable
()
self
.
tic
()
self
.
tic
()
document_path
,
filename
=
self
.
getDocumentPath
()
document_path
,
filename
=
self
.
getDocumentPath
()
file
=
FileUpload
(
document_path
,
filename
)
file
=
FileUpload
(
document_path
,
filename
)
...
...
bt5/erp5_web_ung_theme/bt/revision
View file @
355cc80e
410
411
\ No newline at end of file
\ No newline at end of file
product/ERP5/tests/testBase.py
View file @
355cc80e
...
@@ -33,8 +33,7 @@ import os
...
@@ -33,8 +33,7 @@ import os
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
SequenceList
...
@@ -79,7 +78,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -79,7 +78,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
"""
"""
"""
"""
return
(
'erp5_base'
,)
return
(
'erp5_
promise'
,
'erp5_
base'
,)
def
login
(
self
):
def
login
(
self
):
uf
=
self
.
getPortal
().
acl_users
uf
=
self
.
getPortal
().
acl_users
...
@@ -94,7 +93,8 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -94,7 +93,8 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
portal_catalog
=
self
.
getCatalogTool
()
portal_catalog
=
self
.
getCatalogTool
()
#portal_catalog.manage_catalogClear()
#portal_catalog.manage_catalogClear()
self
.
createCategories
()
self
.
createCategories
()
self
.
setDefaultSitePreference
()
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
self
.
tic
()
#Overwrite immediateReindexObject() with a crashing method
#Overwrite immediateReindexObject() with a crashing method
def
crashingMethod
(
self
):
def
crashingMethod
(
self
):
...
@@ -120,15 +120,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -120,15 +120,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
o
=
self
.
category_tool
.
group
.
newContent
(
portal_type
=
'Category'
,
o
=
self
.
category_tool
.
group
.
newContent
(
portal_type
=
'Category'
,
id
=
category_id
)
id
=
category_id
)
def
setDefaultSitePreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
conversion_dict
=
_getConversionServerDict
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
default_pref
.
enable
()
return
default_pref
def
stepRemoveWorkflowsRelated
(
self
,
sequence
=
None
,
sequence_list
=
None
,
def
stepRemoveWorkflowsRelated
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
**
kw
):
"""
"""
...
...
product/ERP5/tests/testCRM.py
View file @
355cc80e
...
@@ -31,8 +31,7 @@ import os
...
@@ -31,8 +31,7 @@ import os
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
from
Products.ERP5OOo.tests.testIngestion
import
FILENAME_REGULAR_EXPRESSION
from
Products.ERP5OOo.tests.testIngestion
import
FILENAME_REGULAR_EXPRESSION
from
Products.ERP5OOo.tests.testIngestion
import
REFERENCE_REGULAR_EXPRESSION
from
Products.ERP5OOo.tests.testIngestion
import
REFERENCE_REGULAR_EXPRESSION
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
...
@@ -81,7 +80,8 @@ class TestCRM(BaseTestCRM):
...
@@ -81,7 +80,8 @@ class TestCRM(BaseTestCRM):
return
"CRM"
return
"CRM"
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_full_text_myisam_catalog'
,
return
(
'erp5_promise'
,
'erp5_full_text_myisam_catalog'
,
'erp5_core_proxy_field_legacy'
,
'erp5_core_proxy_field_legacy'
,
'erp5_base'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
...
@@ -436,7 +436,8 @@ class TestCRMMailIngestion(BaseTestCRM):
...
@@ -436,7 +436,8 @@ class TestCRMMailIngestion(BaseTestCRM):
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
# Mail Ingestion must work with CRM alone.
# Mail Ingestion must work with CRM alone.
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
...
@@ -802,7 +803,8 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -802,7 +803,8 @@ class TestCRMMailSend(BaseTestCRM):
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
# In this test, We will attach some document portal types in event.
# In this test, We will attach some document portal types in event.
# So we add DMS and Web.
# So we add DMS and Web.
return
(
'erp5_base'
,
return
(
'erp5_promise'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_crm'
,
'erp5_crm'
,
...
@@ -835,14 +837,12 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -835,14 +837,12 @@ class TestCRMMailSend(BaseTestCRM):
default_email_text
=
'me@erp5.org'
)
default_email_text
=
'me@erp5.org'
)
# set preference
# set preference
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
self
.
tic
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
]
)
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
(
)
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
==
'disabled'
:
default_pref
.
enable
()
# make sure customers are available to catalog
# make sure customers are available to catalog
self
.
tic
()
self
.
tic
()
...
...
product/ERP5/tests/testERP5WebWithCRM.py
View file @
355cc80e
...
@@ -30,10 +30,6 @@
...
@@ -30,10 +30,6 @@
import
unittest
import
unittest
import
transaction
import
transaction
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
class
TestERP5WebWithCRM
(
ERP5TypeTestCase
):
class
TestERP5WebWithCRM
(
ERP5TypeTestCase
):
"""Test for erp5_web and erp5_crm features
"""Test for erp5_web and erp5_crm features
"""
"""
...
@@ -45,7 +41,8 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
...
@@ -45,7 +41,8 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_base'
,
return
(
'erp5_promise'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_crm'
,
'erp5_crm'
,
...
@@ -55,25 +52,10 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
...
@@ -55,25 +52,10 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
login
()
self
.
login
()
self
.
setSystemPreferenc
e
()
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solv
e
()
user
=
self
.
createUser
(
'robby'
)
user
=
self
.
createUser
(
'robby'
)
self
.
createUserAssignment
(
user
,
{})
self
.
createUserAssignment
(
user
,
{})
def
setSystemPreference
(
self
):
portal_type
=
'System Preference'
preference_list
=
self
.
portal
.
portal_preferences
.
contentValues
(
portal_type
=
portal_type
)
if
not
preference_list
:
preference
=
self
.
portal
.
portal_preferences
.
newContent
(
portal_type
=
portal_type
)
else
:
preference
=
preference_list
[
0
]
conversion_dict
=
_getConversionServerDict
()
preference
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
preference
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
preference
,
'enable'
):
preference
.
enable
()
def
clearModule
(
self
,
module
):
def
clearModule
(
self
,
module
):
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
self
.
tic
()
self
.
tic
()
...
...
product/ERP5/tests/testERP5WebWithDms.py
View file @
355cc80e
...
@@ -35,8 +35,7 @@ from lxml import etree
...
@@ -35,8 +35,7 @@ from lxml import etree
from
AccessControl
import
Unauthorized
from
AccessControl
import
Unauthorized
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
from
Products.ERP5Type.tests.utils
import
FileUpload
,
createZODBPythonScript
from
Products.ERP5Type.tests.utils
import
FileUpload
,
createZODBPythonScript
from
Products.ERP5.Document.Document
import
ConversionError
from
Products.ERP5.Document.Document
import
ConversionError
...
@@ -96,7 +95,8 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -96,7 +95,8 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_base'
,
'erp5_base'
,
'erp5_jquery'
,
'erp5_jquery'
,
'erp5_knowledge_pad'
,
'erp5_knowledge_pad'
,
...
@@ -109,20 +109,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -109,20 +109,11 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
login
()
self
.
login
()
portal
=
self
.
getPortal
()
portal
=
self
.
getPortal
()
self
.
setDefaultSitePreferenc
e
()
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solv
e
()
self
.
web_page_module
=
self
.
portal
.
web_page_module
self
.
web_page_module
=
self
.
portal
.
web_page_module
self
.
web_site_module
=
self
.
portal
.
web_site_module
self
.
web_site_module
=
self
.
portal
.
web_site_module
self
.
portal_id
=
self
.
portal
.
getId
()
self
.
portal_id
=
self
.
portal
.
getId
()
def
setDefaultSitePreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
conversion_dict
=
_getConversionServerDict
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
default_pref
.
enable
()
return
default_pref
def
clearModule
(
self
,
module
):
def
clearModule
(
self
,
module
):
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
self
.
tic
()
self
.
tic
()
...
...
product/ERP5/tests/testKM.py
View file @
355cc80e
...
@@ -50,6 +50,7 @@ class TestKMMixIn(TestDocumentMixin):
...
@@ -50,6 +50,7 @@ class TestKMMixIn(TestDocumentMixin):
manager_password
=
''
manager_password
=
''
website_id
=
'km_test'
website_id
=
'km_test'
business_template_list
=
[
'erp5_core_proxy_field_legacy'
,
business_template_list
=
[
'erp5_core_proxy_field_legacy'
,
'erp5_promise'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_jquery'
,
'erp5_jquery_ui'
,
'erp5_knowledge_pad'
,
'erp5_jquery'
,
'erp5_jquery_ui'
,
'erp5_knowledge_pad'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
...
...
product/ERP5/tests/testWebCrawler.py
View file @
355cc80e
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
##############################################################################
##############################################################################
import
unittest
import
unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
import
urlnorm
# This library is imported to detect lack of
import
urlnorm
# This library is imported to detect lack of
# urlnorm availibility in python environment
# urlnorm availibility in python environment
...
@@ -44,7 +43,6 @@ class TestWebCrawler(ERP5TypeTestCase):
...
@@ -44,7 +43,6 @@ class TestWebCrawler(ERP5TypeTestCase):
"""
"""
_path_to_delete_list
=
[]
_path_to_delete_list
=
[]
system_pref_id
=
'my_preference'
def
getTitle
(
self
):
def
getTitle
(
self
):
"""
"""
...
@@ -56,7 +54,8 @@ class TestWebCrawler(ERP5TypeTestCase):
...
@@ -56,7 +54,8 @@ class TestWebCrawler(ERP5TypeTestCase):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_base'
,
'erp5_base'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion_mysql_innodb_catalog'
,
...
@@ -89,23 +88,11 @@ class TestWebCrawler(ERP5TypeTestCase):
...
@@ -89,23 +88,11 @@ class TestWebCrawler(ERP5TypeTestCase):
self
.
tic
()
self
.
tic
()
def
setSystemPreference
(
self
):
def
setSystemPreference
(
self
):
portal_preferences
=
self
.
portal
.
portal_preferences
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
system_preference
=
portal_preferences
.
_getOb
(
self
.
system_pref_id
,
None
)
self
.
tic
()
if
system_preference
is
None
:
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
system_preference
=
portal_preferences
.
newContent
(
id
=
self
.
system_pref_id
,
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
portal_type
=
'System Preference'
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
conversion_dict
=
_getConversionServerDict
()
system_preference
.
\
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
system_preference
.
\
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
system_preference
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
system_preference
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
system_preference
.
getPreferenceState
()
!=
'global'
:
system_preference
.
enable
()
def
bootstrapWebSite
(
self
):
def
bootstrapWebSite
(
self
):
"""Create 1 Website
"""Create 1 Website
...
@@ -278,7 +265,7 @@ class TestWebCrawler(ERP5TypeTestCase):
...
@@ -278,7 +265,7 @@ class TestWebCrawler(ERP5TypeTestCase):
self
.
assertFalse
(
len
(
new_web_crawler
))
self
.
assertFalse
(
len
(
new_web_crawler
))
# set another namespace on preference
# set another namespace on preference
preference
=
self
.
portal
.
portal_preferences
[
self
.
system_pref_id
]
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
.
setPreferredIngestionNamespace
(
'NEW'
)
preference
.
setPreferredIngestionNamespace
(
'NEW'
)
self
.
tic
()
self
.
tic
()
new_web_crawler
.
crawlContent
()
new_web_crawler
.
crawlContent
()
...
...
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
View file @
355cc80e
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
AccessControl
import
Unauthorized
from
AccessControl
import
Unauthorized
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
Products.ERP5Type.tests.SecurityTestCase
import
SecurityTestCase
from
Products.ERP5Type.tests.SecurityTestCase
import
SecurityTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
class
TestLiveConfiguratorWorkflowMixin
(
SecurityTestCase
):
class
TestLiveConfiguratorWorkflowMixin
(
SecurityTestCase
):
...
@@ -85,7 +85,8 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -85,7 +85,8 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
'erp5_ooo_import'
)
'erp5_ooo_import'
)
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_promise'
,
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_workflow'
,
'erp5_workflow'
,
...
@@ -119,24 +120,9 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -119,24 +120,9 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
# it is required by SecurityTestCase
# it is required by SecurityTestCase
self
.
workflow_tool
=
self
.
portal
.
portal_workflow
self
.
workflow_tool
=
self
.
portal
.
portal_workflow
self
.
setDefaultSitePreference
()
self
.
setDefaultSitePreference
()
self
.
setSystemPreferenc
e
()
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solv
e
()
self
.
portal
.
portal_activities
.
unsubscribe
()
self
.
portal
.
portal_activities
.
unsubscribe
()
def
setSystemPreference
(
self
):
portal_type
=
'System Preference'
preference_list
=
self
.
portal
.
portal_preferences
.
contentValues
(
portal_type
=
portal_type
)
if
not
preference_list
:
preference
=
self
.
portal
.
portal_preferences
.
newContent
(
portal_type
=
portal_type
)
else
:
preference
=
preference_list
[
0
]
conversion_dict
=
_getConversionServerDict
()
preference
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
preference
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
preference
,
'enable'
):
preference
.
enable
()
def
setDefaultSitePreference
(
self
):
def
setDefaultSitePreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
...
@@ -159,6 +145,14 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -159,6 +145,14 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
(
step_title
,
server_response
))
(
step_title
,
server_response
))
### STEPS
### STEPS
def
stepCheckSystemPreferenceAfterInstallation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check System Preference"""
system_preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
conversion_dict
=
_getConversionServerDict
()
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerPortNumber
(),
conversion_dict
[
'port'
])
self
.
assertEquals
(
system_preference
.
getPreferredOoodocServerAddress
(),
conversion_dict
[
'hostname'
])
def
stepCleanUpRequest
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepCleanUpRequest
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Restore clean up the request """
""" Restore clean up the request """
...
...
product/ERP5Configurator/tests/testConfiguratorItem.py
View file @
355cc80e
...
@@ -43,6 +43,7 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
...
@@ -43,6 +43,7 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_promise'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_workflow'
,
'erp5_workflow'
,
...
...
product/ERP5Configurator/tests/testConfiguratorTool.py
View file @
355cc80e
...
@@ -38,6 +38,7 @@ class TestConfiguratorTool(TestLiveConfiguratorWorkflowMixin):
...
@@ -38,6 +38,7 @@ class TestConfiguratorTool(TestLiveConfiguratorWorkflowMixin):
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_promise'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_workflow'
,
'erp5_workflow'
,
...
...
product/ERP5OOo/tests/TestFormPrintoutMixin.py
View file @
355cc80e
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
StringIO
import
StringIO
from
StringIO
import
StringIO
...
@@ -39,7 +38,7 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
...
@@ -39,7 +38,7 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
run_all_test
=
1
run_all_test
=
1
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_base'
,
'erp5_ui_test'
,
'erp5_odt_style'
)
return
(
'erp5_
promise'
,
'erp5_
base'
,
'erp5_ui_test'
,
'erp5_odt_style'
)
def
login
(
self
):
def
login
(
self
):
uf
=
self
.
getPortal
().
acl_users
uf
=
self
.
getPortal
().
acl_users
...
@@ -48,13 +47,7 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
...
@@ -48,13 +47,7 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
newSecurityManager
(
None
,
user
)
newSecurityManager
(
None
,
user
)
def
setSystemPreference
(
self
):
def
setSystemPreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
#default_pref.setPreferredConversionCacheFactory('document_cache_factory')
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
def
_validate
(
self
,
odf_file_data
):
def
_validate
(
self
,
odf_file_data
):
error_list
=
self
.
validator
.
validate
(
odf_file_data
)
error_list
=
self
.
validator
.
validate
(
odf_file_data
)
...
...
product/ERP5OOo/tests/testDms.py
View file @
355cc80e
...
@@ -53,7 +53,6 @@ from cgi import FieldStorage
...
@@ -53,7 +53,6 @@ from cgi import FieldStorage
import
ZPublisher.HTTPRequest
import
ZPublisher.HTTPRequest
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.utils
import
DummyLocalizer
from
Products.ERP5Type.tests.utils
import
DummyLocalizer
from
Products.ERP5OOo.OOoUtils
import
OOoBuilder
from
Products.ERP5OOo.OOoUtils
import
OOoBuilder
...
@@ -93,6 +92,7 @@ def makeFileUpload(name, as_name=None):
...
@@ -93,6 +92,7 @@ def makeFileUpload(name, as_name=None):
class
TestDocumentMixin
(
ERP5TypeTestCase
):
class
TestDocumentMixin
(
ERP5TypeTestCase
):
business_template_list
=
[
'erp5_core_proxy_field_legacy'
,
business_template_list
=
[
'erp5_core_proxy_field_legacy'
,
'erp5_promise'
,
'erp5_jquery'
,
'erp5_jquery'
,
'erp5_full_text_myisam_catalog'
,
'erp5_full_text_myisam_catalog'
,
'erp5_base'
,
'erp5_base'
,
...
@@ -112,41 +112,17 @@ class TestDocumentMixin(ERP5TypeTestCase):
...
@@ -112,41 +112,17 @@ class TestDocumentMixin(ERP5TypeTestCase):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
TestDocumentMixin
.
login
(
self
)
TestDocumentMixin
.
login
(
self
)
self
.
setDefaultSitePreference
()
self
.
setSystemPreference
()
self
.
setSystemPreference
()
self
.
tic
()
self
.
tic
()
self
.
login
()
self
.
login
()
def
setDefaultSitePreference
(
self
):
def
setSystemPreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
self
.
tic
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
default_pref
.
edit
(
preferred_conversion_cache_factory
=
'erp5_content_long'
)
default_pref
.
enable
()
return
default_pref
def
setSystemPreference
(
self
):
portal_type
=
'System Preference'
preference_list
=
self
.
portal
.
portal_preferences
.
contentValues
(
portal_type
=
portal_type
)
if
not
preference_list
:
# create a Cache Factory for tests
cache_factory
=
self
.
portal
.
portal_caches
.
newContent
(
portal_type
=
'Cache Factory'
)
cache_factory
.
cache_duration
=
36000
cache_plugin
=
cache_factory
.
newContent
(
portal_type
=
'Ram Cache'
)
cache_plugin
.
cache_expire_check_interval
=
54000
preference
=
self
.
portal
.
portal_preferences
.
newContent
(
title
=
"Default System Preference"
,
# use local RAM based cache as some tests need it
preferred_conversion_cache_factory
=
cache_factory
.
getId
(),
portal_type
=
portal_type
)
else
:
preference
=
preference_list
[
0
]
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
preference
,
'enable'
):
preference
.
enable
()
return
preference
def
getDocumentModule
(
self
):
def
getDocumentModule
(
self
):
return
getattr
(
self
.
getPortal
(),
'document_module'
)
return
getattr
(
self
.
getPortal
(),
'document_module'
)
...
...
product/ERP5OOo/tests/testDmsWithFlare.py
View file @
355cc80e
...
@@ -42,21 +42,18 @@ class TestDocumentWithFlare(TestDocument):
...
@@ -42,21 +42,18 @@ class TestDocumentWithFlare(TestDocument):
return
"DMS with Flare"
return
"DMS with Flare"
def
setSystemPreference
(
self
):
def
setSystemPreference
(
self
):
system_preference
=
TestDocument
.
setSystemPreference
(
self
)
TestDocument
.
setSystemPreference
(
self
)
system_preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
system_preference
.
setPreferredConversionCacheFactory
(
'dms_cache_factory'
)
memcached
=
_getPersistentMemcachedServerDict
()
memcached
=
_getPersistentMemcachedServerDict
()
# create a Cache Factory for tests
cache_factory
=
self
.
portal
.
portal_caches
.
newContent
(
portal_type
=
'Cache Factory'
)
cache_factory
.
cache_duration
=
15768000
cache_plugin
=
cache_factory
.
newContent
(
portal_type
=
'Distributed Ram Cache'
)
system_preference
.
setPreferredConversionCacheFactory
(
cache_factory
.
getId
())
persistent_memcached_plugin
=
self
.
portal
.
portal_memcached
.
persistent_memcached_plugin
persistent_memcached_plugin
=
self
.
portal
.
portal_memcached
.
persistent_memcached_plugin
persistent_memcached_plugin
.
setUrlString
(
'%s:%s'
%
(
memcached
[
'hostname'
],
memcached
[
'port'
]))
persistent_memcached_plugin
.
setUrlString
(
'%s:%s'
%
(
memcached
[
'hostname'
],
memcached
[
'port'
]))
cache_plugin
.
setSpecialiseValue
(
persistent_memcached_plugin
)
self
.
portal
.
portal_caches
.
dms_cache_factory
.
persistent_
cache_plugin
.
setSpecialiseValue
(
persistent_memcached_plugin
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestDocumentWithFlare
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestDocumentWithFlare
))
return
suite
return
suite
# vim: syntax=python shiftwidth=2
# vim: syntax=python shiftwidth=2
product/ERP5OOo/tests/testIngestion.py
View file @
355cc80e
...
@@ -85,7 +85,7 @@ class TestIngestion(ERP5TypeTestCase):
...
@@ -85,7 +85,7 @@ class TestIngestion(ERP5TypeTestCase):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_base'
,
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_
promise'
,
'erp5_
base'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_web'
,
'erp5_crm'
,
'erp5_dms'
)
'erp5_web'
,
'erp5_crm'
,
'erp5_dms'
)
...
@@ -141,14 +141,11 @@ class TestIngestion(ERP5TypeTestCase):
...
@@ -141,14 +141,11 @@ class TestIngestion(ERP5TypeTestCase):
self
.
commit
()
self
.
commit
()
def
setSystemPreference
(
self
):
def
setSystemPreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
self
.
tic
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
def
setSimulatedNotificationScript
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
setSimulatedNotificationScript
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""
"""
...
...
product/ERP5OOo/tests/testOOoImport.py
View file @
355cc80e
...
@@ -32,8 +32,8 @@ import os
...
@@ -32,8 +32,8 @@ import os
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
install_product_quiet
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5OOo.OOoUtils
import
OOoParser
from
Products.ERP5OOo.OOoUtils
import
OOoParser
from
Products.ERP5Form.PreferenceTool
import
Priority
from
Products.ERP5Form.PreferenceTool
import
Priority
...
@@ -55,13 +55,10 @@ class TestOOoImportMixin(ERP5TypeTestCase):
...
@@ -55,13 +55,10 @@ class TestOOoImportMixin(ERP5TypeTestCase):
Initialize the ERP5 site.
Initialize the ERP5 site.
"""
"""
self
.
login
()
self
.
login
()
self
.
pref
=
self
.
portal
.
portal_preferences
.
newContent
(
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
portal_type
=
'System Preference'
)
self
.
tic
()
conversion_dict
=
_getConversionServerDict
()
self
.
pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
self
.
pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
self
.
pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
self
.
pref
.
setPriority
(
Priority
.
SITE
)
self
.
pref
.
setPriority
(
Priority
.
SITE
)
self
.
pref
.
enable
()
# create browser_id_manager
# create browser_id_manager
if
not
"browser_id_manager"
in
self
.
portal
.
objectIds
():
if
not
"browser_id_manager"
in
self
.
portal
.
objectIds
():
...
@@ -124,7 +121,7 @@ class TestOOoImport(TestOOoImportMixin):
...
@@ -124,7 +121,7 @@ class TestOOoImport(TestOOoImportMixin):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_base'
,
'erp5_ooo_import'
)
return
(
'erp5_
promise'
,
'erp5_
base'
,
'erp5_ooo_import'
)
##################################
##################################
## Basic steps
## Basic steps
...
@@ -888,7 +885,7 @@ class TestOOoImportWeb(TestOOoImportMixin):
...
@@ -888,7 +885,7 @@ class TestOOoImportWeb(TestOOoImportMixin):
"""
"""
Return the list of required business templates.
Return the list of required business templates.
"""
"""
return
(
'erp5_base'
,
'erp5_web'
,
'erp5_ooo_import'
)
return
(
'erp5_
promise'
,
'erp5_
base'
,
'erp5_web'
,
'erp5_ooo_import'
)
def
test_CategoryTool_importCategoryFileExpirationSupport
(
self
):
def
test_CategoryTool_importCategoryFileExpirationSupport
(
self
):
"""Import category file with expiration request, and do it again to be
"""Import category file with expiration request, and do it again to be
...
...
product/ERP5OOo/tests/testOOoStyle.py
View file @
355cc80e
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
##############################################################################
##############################################################################
import
unittest
import
unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
from
Products.ERP5Form.Selection
import
Selection
from
Products.ERP5Form.Selection
import
Selection
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5OOo.tests.utils
import
Validator
from
Products.ERP5OOo.tests.utils
import
Validator
...
@@ -46,14 +45,14 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -46,14 +45,14 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
content_type
=
None
content_type
=
None
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_promise'
,
'erp5_base'
,
'erp5_ods_style'
,
'erp5_odt_style'
,)
'erp5_base'
,
'erp5_ods_style'
,
'erp5_odt_style'
,)
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
if
not
self
.
skin
:
if
not
self
.
skin
:
raise
NotImplementedError
(
'Subclasses must define skin'
)
raise
NotImplementedError
(
'Subclasses must define skin'
)
self
.
setDefaultSitePreferenc
e
()
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solv
e
()
gender
=
self
.
portal
.
portal_categories
.
gender
gender
=
self
.
portal
.
portal_categories
.
gender
if
'male'
not
in
gender
.
objectIds
():
if
'male'
not
in
gender
.
objectIds
():
...
@@ -85,15 +84,6 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -85,15 +84,6 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
portal
.
portal_selections
.
setSelectionFor
(
self
.
portal
.
portal_selections
.
setSelectionFor
(
'person_module_selection'
,
Selection
())
'person_module_selection'
,
Selection
())
def
setDefaultSitePreference
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
conversion_dict
=
_getConversionServerDict
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
default_pref
.
enable
()
return
default_pref
def
publish
(
self
,
*
args
,
**
kw
):
def
publish
(
self
,
*
args
,
**
kw
):
kw
[
'handle_errors'
]
=
not
debug
kw
[
'handle_errors'
]
=
not
debug
return
super
(
TestOOoStyle
,
self
).
publish
(
*
args
,
**
kw
)
return
super
(
TestOOoStyle
,
self
).
publish
(
*
args
,
**
kw
)
...
...
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
View file @
355cc80e
...
@@ -31,8 +31,7 @@ import os
...
@@ -31,8 +31,7 @@ import os
import
unittest
import
unittest
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.runUnitTest
import
tests_home
from
Products.ERP5Type.tests.runUnitTest
import
tests_home
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5SyncML.Conduit.ERP5DocumentConduit
import
ERP5DocumentConduit
from
Products.ERP5SyncML.Conduit.ERP5DocumentConduit
import
ERP5DocumentConduit
from
zLOG
import
LOG
from
zLOG
import
LOG
...
@@ -118,7 +117,8 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
...
@@ -118,7 +117,8 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
"""
"""
Return the list of business templates.
Return the list of business templates.
"""
"""
return
(
'erp5_base'
,
return
(
'erp5_promise'
,
'erp5_base'
,
'erp5_syncml'
,
'erp5_syncml'
,
'erp5_ingestion'
,
'erp5_ingestion'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion_mysql_innodb_catalog'
,
...
@@ -146,14 +146,11 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
...
@@ -146,14 +146,11 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
self
.
clearPublicationsAndSubscriptions
()
self
.
clearPublicationsAndSubscriptions
()
def
setSystemPreferences
(
self
):
def
setSystemPreferences
(
self
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
self
.
portal
.
portal_alarms
.
promise_conversion_server
.
solve
()
conversion_dict
=
_getConversionServerDict
()
self
.
tic
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentFileNameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
==
'disabled'
:
default_pref
.
enable
()
def
addSubscriptions
(
self
):
def
addSubscriptions
(
self
):
portal_id
=
self
.
getPortalId
()
portal_id
=
self
.
getPortalId
()
...
...
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
355cc80e
...
@@ -347,6 +347,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
...
@@ -347,6 +347,7 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
self.portal, self.run_only, self.use_phanthom)
self.portal, self.run_only, self.use_phanthom)
def setSystemPreference(self):
def setSystemPreference(self):
# Use erp5_promise instead.
conversion_dict = _getConversionServerDict()
conversion_dict = _getConversionServerDict()
self.portal.Zuite_setPreference(
self.portal.Zuite_setPreference(
working_copy_list=bt5_dir_list,
working_copy_list=bt5_dir_list,
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
355cc80e
...
@@ -857,11 +857,10 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -857,11 +857,10 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
"""
"""
return
()
return
()
def
loadPromise
(
self
):
def
_
loadPromise
(
self
):
""" Create promise configuration file and load it into configuration
""" Create promise configuration file and load it into configuration
"""
"""
promise_path
=
os
.
path
.
join
(
instancehome
,
"promise.cfg"
)
promise_path
=
os
.
path
.
join
(
instancehome
,
"promise.cfg"
)
ZopeTestCase
.
_print
(
'Adding Promise at %s...
\
n
'
%
promise_path
)
_createTestPromiseConfigurationFile
(
promise_path
)
_createTestPromiseConfigurationFile
(
promise_path
)
config
.
product_config
[
"/%s"
%
self
.
getPortalName
()]
=
\
config
.
product_config
[
"/%s"
%
self
.
getPortalName
()]
=
\
{
"promise_path"
:
promise_path
}
{
"promise_path"
:
promise_path
}
...
@@ -1034,8 +1033,8 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -1034,8 +1033,8 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
self
.
_setUpDummyMailHost
()
self
.
_setUpDummyMailHost
()
self
.
serverhost
,
self
.
serverport
=
self
.
startZServer
(
verbose
=
True
)
self
.
serverhost
,
self
.
serverport
=
self
.
startZServer
(
verbose
=
True
)
self
.
_registerNode
(
distributing
=
1
,
processing
=
1
)
self
.
_registerNode
(
distributing
=
1
,
processing
=
1
)
self
.
loadPromise
()
self
.
_loadPromise
()
self
.
_updateConnectionStrings
()
self
.
_updateConnectionStrings
()
self
.
_recreateCatalog
()
self
.
_recreateCatalog
()
self
.
_installBusinessTemplateList
(
business_template_list
,
self
.
_installBusinessTemplateList
(
business_template_list
,
...
...
product/ERP5Type/tests/testCacheTool.py
View file @
355cc80e
...
@@ -32,7 +32,6 @@ import unittest
...
@@ -32,7 +32,6 @@ import unittest
from
Testing
import
ZopeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getPersistentMemcachedServerDict
from
Products.ERP5Type.CachePlugins.DummyCache
import
DummyCache
from
Products.ERP5Type.CachePlugins.DummyCache
import
DummyCache
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.Cache
import
CachingMethod
,
DEFAULT_CACHE_SCOPE
from
Products.ERP5Type.Cache
import
CachingMethod
,
DEFAULT_CACHE_SCOPE
...
@@ -62,13 +61,16 @@ class TestCacheTool(ERP5TypeTestCase):
...
@@ -62,13 +61,16 @@ class TestCacheTool(ERP5TypeTestCase):
"""
"""
Return the list of business templates.
Return the list of business templates.
"""
"""
return
(
'erp5_base'
,)
return
(
'erp5_
promise'
,
'erp5_
base'
,)
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
self
.
login
()
self
.
login
()
self
.
checkCacheTool
()
self
.
checkCacheTool
()
self
.
checkPortalTypes
()
self
.
checkPortalTypes
()
self
.
createPersistentMemcachedPlugin
()
# Configure Memcache and persistent cache (kumofs)
self
.
portal
.
portal_alarms
.
promise_memcached_server
.
solve
()
self
.
portal
.
portal_alarms
.
promise_kumofs_server
.
solve
()
self
.
tic
()
self
.
createCacheFactories
()
self
.
createCacheFactories
()
self
.
createCachedMethod
()
self
.
createCachedMethod
()
self
.
commit
()
self
.
commit
()
...
@@ -95,20 +97,6 @@ class TestCacheTool(ERP5TypeTestCase):
...
@@ -95,20 +97,6 @@ class TestCacheTool(ERP5TypeTestCase):
portal_type
=
getattr
(
portal_types
,
typeinfo_name
,
None
)
portal_type
=
getattr
(
portal_types
,
typeinfo_name
,
None
)
self
.
assertNotEqual
(
None
,
portal_type
)
self
.
assertNotEqual
(
None
,
portal_type
)
def
createPersistentMemcachedPlugin
(
self
):
portal_memcached
=
self
.
portal
.
portal_memcached
# setup persistent memcached
memcached_plugin_id
=
'flare'
if
getattr
(
portal_memcached
,
memcached_plugin_id
,
None
)
is
None
:
connection_dict
=
_getPersistentMemcachedServerDict
()
url_string
=
'%(hostname)s:%(port)s'
%
connection_dict
portal_memcached
.
newContent
(
portal_type
=
'Memcached Plugin'
,
id
=
memcached_plugin_id
,
url_string
=
url_string
,
server_max_key_length
=
0
,
server_max_value_length
=
0
,
priority
=
1
)
def
createCacheFactories
(
self
):
def
createCacheFactories
(
self
):
portal
=
self
.
getPortal
()
portal
=
self
.
getPortal
()
portal_caches
=
portal
.
portal_caches
portal_caches
=
portal
.
portal_caches
...
@@ -150,7 +138,7 @@ class TestCacheTool(ERP5TypeTestCase):
...
@@ -150,7 +138,7 @@ class TestCacheTool(ERP5TypeTestCase):
cache_duration
=
self
.
cache_duration
)
cache_duration
=
self
.
cache_duration
)
dram_cache_plugin
=
dram_cache_factory
.
newContent
(
dram_cache_plugin
=
dram_cache_factory
.
newContent
(
portal_type
=
"Distributed Ram Cache"
,
portal_type
=
"Distributed Ram Cache"
,
specialise
=
'portal_memcached/flare
'
)
specialise
=
'portal_memcached/persistent_memcached_plugin
'
)
dram_cache_plugin
.
setIntIndex
(
0
)
dram_cache_plugin
.
setIntIndex
(
0
)
if
getattr
(
portal_caches
,
'erp5_user_factory'
,
None
)
is
None
:
if
getattr
(
portal_caches
,
'erp5_user_factory'
,
None
)
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment