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
1
Merge Requests
1
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
Vincent Bechu
erp5
Commits
28824962
Commit
28824962
authored
Jun 11, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set cloudoo on preferences in ERP5TypeTestCase
parent
802d3f53
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
25 additions
and
128 deletions
+25
-128
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
+0
-3
product/ERP5/tests/testAutoLogout.py
product/ERP5/tests/testAutoLogout.py
+5
-2
product/ERP5/tests/testBase.py
product/ERP5/tests/testBase.py
+1
-12
product/ERP5/tests/testCRM.py
product/ERP5/tests/testCRM.py
+1
-5
product/ERP5/tests/testERP5Coordinate.py
product/ERP5/tests/testERP5Coordinate.py
+0
-3
product/ERP5/tests/testERP5WebWithCRM.py
product/ERP5/tests/testERP5WebWithCRM.py
+1
-18
product/ERP5/tests/testERP5WebWithDms.py
product/ERP5/tests/testERP5WebWithDms.py
+1
-12
product/ERP5/tests/testResource.py
product/ERP5/tests/testResource.py
+2
-2
product/ERP5/tests/testWebCrawler.py
product/ERP5/tests/testWebCrawler.py
+1
-8
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
+0
-16
product/ERP5OOo/tests/TestFormPrintoutMixin.py
product/ERP5OOo/tests/TestFormPrintoutMixin.py
+0
-10
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+0
-4
product/ERP5OOo/tests/testFormPrintoutAsODG.py
product/ERP5OOo/tests/testFormPrintoutAsODG.py
+0
-1
product/ERP5OOo/tests/testFormPrintoutAsODT.py
product/ERP5OOo/tests/testFormPrintoutAsODT.py
+0
-1
product/ERP5OOo/tests/testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+0
-3
product/ERP5OOo/tests/testOOoBatchMode.py
product/ERP5OOo/tests/testOOoBatchMode.py
+9
-4
product/ERP5OOo/tests/testOOoImport.py
product/ERP5OOo/tests/testOOoImport.py
+0
-7
product/ERP5OOo/tests/testOOoStyle.py
product/ERP5OOo/tests/testOOoStyle.py
+1
-13
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
+0
-4
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+3
-0
No files found.
bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
View file @
28824962
...
...
@@ -488,9 +488,6 @@ class TestUNG(ERP5TypeTestCase):
self
.
logout
()
self
.
assertEquals
(
json
.
loads
(
self
.
portal
.
Base_getPreferencePathList
()),
None
)
self
.
login
(
"ERP5TypeTestCase"
)
self
.
changeSkin
(
"UNGDoc"
)
preference_dict
=
json
.
loads
(
self
.
portal
.
Base_getPreferencePathList
())
self
.
assertEquals
(
preference_dict
,
{})
self
.
portal
.
portal_preferences
.
ung_preference
.
enable
()
self
.
tic
()
self
.
changeSkin
(
"UNGDoc"
)
...
...
product/ERP5/tests/testAutoLogout.py
View file @
28824962
...
...
@@ -61,8 +61,11 @@ class TestAuoLogout(ERP5TypeTestCase):
self
.
login
(
self
.
manager_username
)
# setup short auto-logout period
portal
.
portal_preferences
.
default_site_preference
.
setPreferredMaxUserInactivityDuration
(
5
)
portal
.
portal_preferences
.
default_site_preference
.
enable
()
preference
=
self
.
portal
.
portal_preferences
[
self
.
getDefaultSitePreferenceId
()]
preference
.
setPreferredMaxUserInactivityDuration
(
5
)
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
preference
,
'enable'
):
preference
.
enable
()
self
.
tic
()
def
test_01_AutoLogout
(
self
):
...
...
product/ERP5/tests/testBase.py
View file @
28824962
...
...
@@ -33,10 +33,9 @@ import os
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl
import
getSecurityManager
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
...
@@ -94,7 +93,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
portal_catalog
=
self
.
getCatalogTool
()
#portal_catalog.manage_catalogClear()
self
.
createCategories
()
self
.
setDefaultSitePreference
()
#Overwrite immediateReindexObject() with a crashing method
def
crashingMethod
(
self
):
...
...
@@ -120,15 +118,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
o
=
self
.
category_tool
.
group
.
newContent
(
portal_type
=
'Category'
,
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
,
**
kw
):
"""
...
...
product/ERP5/tests/testCRM.py
View file @
28824962
...
...
@@ -29,10 +29,9 @@
import
unittest
import
os
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
Products.ERP5OOo.tests.testIngestion
import
FILENAME_REGULAR_EXPRESSION
from
Products.ERP5OOo.tests.testIngestion
import
REFERENCE_REGULAR_EXPRESSION
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
...
...
@@ -957,9 +956,6 @@ class TestCRMMailSend(BaseTestCRM):
# set preference
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
conversion_dict
=
_getConversionServerDict
()
default_pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
default_pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
==
'disabled'
:
...
...
product/ERP5/tests/testERP5Coordinate.py
View file @
28824962
...
...
@@ -114,7 +114,6 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
pref
.
setPreferredTelephoneDefaultCountryNumber
(
'33'
)
pref
.
setPreferredTelephoneDefaultAreaNumber
(
'2'
)
pref
.
enable
()
tel
.
fromText
(
coordinate_text
=
'11111111'
)
self
.
assertEquals
(
'+33(0)2-11111111'
,
tel
.
asText
())
...
...
@@ -124,7 +123,6 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
pref
.
setPreferredTelephoneDefaultCountryNumber
(
''
)
pref
.
setPreferredTelephoneDefaultAreaNumber
(
''
)
pref
.
enable
()
tel
.
fromText
(
coordinate_text
=
'+11 1 11111111'
)
tel
.
fromText
(
coordinate_text
=
'+22333445555'
)
self
.
assertEquals
(
'+(0)-22333445555'
,
tel
.
asText
())
...
...
@@ -317,7 +315,6 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
pref
.
setPreferredTelephoneDefaultCountryNumber
(
''
)
pref
.
setPreferredTelephoneDefaultAreaNumber
(
''
)
pref
.
enable
()
tel
.
fromText
(
coordinate_text
=
'12345678'
)
self
.
assertEquals
(
'+(0)-12345678'
,
tel
.
asText
())
...
...
product/ERP5/tests/testERP5WebWithCRM.py
View file @
28824962
...
...
@@ -29,9 +29,7 @@
import
unittest
import
transaction
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestERP5WebWithCRM
(
ERP5TypeTestCase
):
...
...
@@ -59,21 +57,6 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
user
=
self
.
createUser
(
'robby'
)
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
):
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
self
.
tic
()
...
...
product/ERP5/tests/testERP5WebWithDms.py
View file @
28824962
...
...
@@ -34,9 +34,8 @@ from lxml import etree
from
AccessControl
import
Unauthorized
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
Products.ERP5Type.tests.utils
import
FileUpload
,
createZODBPythonScript
from
Products.ERP5.Document.Document
import
ConversionError
...
...
@@ -109,20 +108,10 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
def
afterSetUp
(
self
):
self
.
login
()
portal
=
self
.
getPortal
()
self
.
setDefaultSitePreference
()
self
.
web_page_module
=
self
.
portal
.
web_page_module
self
.
web_site_module
=
self
.
portal
.
web_site_module
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
):
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
self
.
tic
()
...
...
product/ERP5/tests/testResource.py
View file @
28824962
product/ERP5/tests/testWebCrawler.py
View file @
28824962
...
...
@@ -28,13 +28,11 @@
##############################################################################
import
unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
import
urlnorm
# This library is imported to detect lack of
# urlnorm availibility in python environment
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
# test files' home
FILENAME_REGULAR_EXPRESSION
=
"(?P<reference>[A-Z&é@{]{3,7})-(?P<language>[a-z]{2})-(?P<version>[0-9]{3})"
REFERENCE_REGULAR_EXPRESSION
=
"(?P<reference>[A-Z&é@{]{3,7})(-(?P<language>[a-z]{2}))?(-(?P<version>[0-9]{3}))?"
...
...
@@ -94,11 +92,6 @@ class TestWebCrawler(ERP5TypeTestCase):
if
system_preference
is
None
:
system_preference
=
portal_preferences
.
newContent
(
id
=
self
.
system_pref_id
,
portal_type
=
'System Preference'
)
conversion_dict
=
_getConversionServerDict
()
system_preference
.
\
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
system_preference
.
\
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
system_preference
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
system_preference
.
setPreferredDocumentReferenceRegularExpression
(
...
...
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
View file @
28824962
...
...
@@ -32,7 +32,6 @@ from DateTime import DateTime
from
AccessControl
import
Unauthorized
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.SecurityTestCase
import
SecurityTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
class
TestLiveConfiguratorWorkflowMixin
(
SecurityTestCase
):
...
...
@@ -118,23 +117,8 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
# it is required by SecurityTestCase
self
.
workflow_tool
=
self
.
portal
.
portal_workflow
self
.
setDefaultSitePreference
()
self
.
setSystemPreference
()
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
):
default_pref
=
self
.
portal
.
portal_preferences
.
default_site_preference
...
...
product/ERP5OOo/tests/TestFormPrintoutMixin.py
View file @
28824962
...
...
@@ -31,7 +31,6 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
AccessControl.SecurityManagement
import
newSecurityManager
from
StringIO
import
StringIO
...
...
@@ -47,15 +46,6 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
user
=
uf
.
getUserById
(
'zope'
).
__of__
(
uf
)
newSecurityManager
(
None
,
user
)
def
setSystemPreference
(
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'
])
#default_pref.setPreferredConversionCacheFactory('document_cache_factory')
if
default_pref
.
getPreferenceState
()
!=
'global'
:
default_pref
.
enable
()
def
_validate
(
self
,
odf_file_data
):
error_list
=
self
.
validator
.
validate
(
odf_file_data
)
if
error_list
:
...
...
product/ERP5OOo/tests/testDms.py
View file @
28824962
...
...
@@ -54,7 +54,6 @@ from cgi import FieldStorage
import
ZPublisher.HTTPRequest
from
Testing
import
ZopeTestCase
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
DummyLocalizer
from
Products.ERP5OOo.OOoUtils
import
OOoBuilder
...
...
@@ -127,9 +126,6 @@ class TestDocumentMixin(ERP5TypeTestCase):
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'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
default_pref
,
'enable'
):
...
...
product/ERP5OOo/tests/testFormPrintoutAsODG.py
View file @
28824962
...
...
@@ -58,7 +58,6 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
def
afterSetUp
(
self
):
self
.
login
()
self
.
setSystemPreference
()
# XML validator
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'OpenDocument-v1.2-os-schema.rng'
)
...
...
product/ERP5OOo/tests/testFormPrintoutAsODT.py
View file @
28824962
...
...
@@ -52,7 +52,6 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
def
afterSetUp
(
self
):
self
.
login
()
self
.
setSystemPreference
()
# XML validator
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'OpenDocument-v1.2-os-schema.rng'
)
...
...
product/ERP5OOo/tests/testIngestion.py
View file @
28824962
...
...
@@ -142,9 +142,6 @@ class TestIngestion(ERP5TypeTestCase):
def
setSystemPreference
(
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'
])
default_pref
.
setPreferredDocumentFilenameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
!=
'global'
:
...
...
product/ERP5OOo/tests/testOOoBatchMode.py
View file @
28824962
...
...
@@ -104,8 +104,10 @@ class TestOoodResponse(ERP5TypeTestCase):
request
=
self
.
portal
.
REQUEST
request
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/html'
)
ERP5Site_viewNothingAsOdt
=
self
.
getPortal
().
ERP5Site_viewNothingAsOdt
# This assumes that a conversion error is raised because oood coordinates
# are not defined in preferences.
# Unset oood coordinates in preferences
preference
=
self
.
portal
.
portal_preferences
[
self
.
getDefaultSitePreferenceId
()]
preference
.
setPreferredOoodocServerAddress
(
""
)
self
.
assertRaises
(
ConversionError
,
ERP5Site_viewNothingAsOdt
,
batch_mode
=
0
,
format
=
'pdf'
)
self
.
assertEqual
(
'text/html'
,
...
...
@@ -115,8 +117,11 @@ class TestOoodResponse(ERP5TypeTestCase):
request
=
self
.
portal
.
REQUEST
request
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/html'
)
ERP5Site_viewNothingAsOdt
=
self
.
getPortal
().
ERP5Site_viewNothingAsOdt
# This assumes that a conversion error is raised because oood coordinates
# are not defined in preferences.
# Unset oood coordinates in preferences
preference
=
self
.
portal
.
portal_preferences
[
self
.
getDefaultSitePreferenceId
()]
preference
.
setPreferredOoodocServerAddress
(
""
)
self
.
assertRaises
(
ConversionError
,
ERP5Site_viewNothingAsOdt
,
batch_mode
=
1
,
format
=
'pdf'
)
self
.
assertEqual
(
'text/html'
,
request
.
RESPONSE
.
getHeader
(
'content-type'
).
split
(
';'
)[
0
])
...
...
product/ERP5OOo/tests/testOOoImport.py
View file @
28824962
...
...
@@ -32,11 +32,9 @@ import os
from
AccessControl.SecurityManagement
import
newSecurityManager
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.Sequence
import
SequenceList
from
Products.ERP5OOo.OOoUtils
import
OOoParser
from
Products.ERP5Form.PreferenceTool
import
Priority
from
DateTime
import
DateTime
def
makeFilePath
(
name
):
...
...
@@ -57,11 +55,6 @@ class TestOOoImportMixin(ERP5TypeTestCase):
self
.
login
()
self
.
pref
=
self
.
portal
.
portal_preferences
.
newContent
(
portal_type
=
'System Preference'
)
conversion_dict
=
_getConversionServerDict
()
self
.
pref
.
setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
self
.
pref
.
setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
self
.
pref
.
setPriority
(
Priority
.
SITE
)
self
.
pref
.
enable
()
# create browser_id_manager
if
not
"browser_id_manager"
in
self
.
portal
.
objectIds
():
...
...
product/ERP5OOo/tests/testOOoStyle.py
View file @
28824962
...
...
@@ -28,10 +28,9 @@
##############################################################################
import
unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
,
\
_getConversionServerDict
from
Products.ERP5Form.Selection
import
Selection
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5OOo.tests.utils
import
Validator
import
httplib
...
...
@@ -53,8 +52,6 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
if
not
self
.
skin
:
raise
NotImplementedError
(
'Subclasses must define skin'
)
self
.
setDefaultSitePreference
()
gender
=
self
.
portal
.
portal_categories
.
gender
if
'male'
not
in
gender
.
objectIds
():
gender
.
newContent
(
id
=
'male'
)
...
...
@@ -85,15 +82,6 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
name
=
'person_module_selection'
self
.
portal
.
portal_selections
.
setSelectionFor
(
name
,
Selection
(
name
))
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
):
kw
[
'handle_errors'
]
=
not
debug
return
super
(
TestOOoStyle
,
self
).
publish
(
*
args
,
**
kw
)
...
...
product/ERP5SyncML/tests/testERP5DocumentSyncML.py
View file @
28824962
...
...
@@ -34,7 +34,6 @@ import unittest
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.tests.runUnitTest
import
tests_home
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getConversionServerDict
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5SyncML.Tool
import
SynchronizationTool
from
Products.ERP5SyncML.tests.testERP5SyncML
import
TestERP5SyncMLMixin
...
...
@@ -147,9 +146,6 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
def
setSystemPreferences
(
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'
])
default_pref
.
setPreferredDocumentFileNameRegularExpression
(
FILENAME_REGULAR_EXPRESSION
)
default_pref
.
setPreferredDocumentReferenceRegularExpression
(
REFERENCE_REGULAR_EXPRESSION
)
if
default_pref
.
getPreferenceState
()
==
'disabled'
:
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
28824962
...
...
@@ -889,6 +889,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
preference
.
_setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
preference
.
_setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
if
self
.
portal
.
portal_workflow
.
isTransitionPossible
(
preference
,
'enable'
):
preference
.
enable
()
def
_updateMemcachedConfiguration
(
self
):
"""Update default memcached plugin configuration
"""
...
...
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