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
Aurélien Vermylen
erp5
Commits
3d5aa9e4
Commit
3d5aa9e4
authored
Mar 27, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop commented code from copy and paste
parent
bf2f3cc1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
115 deletions
+1
-115
bt5/erp5_configurator_run_my_doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
...doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
+1
-115
No files found.
bt5/erp5_configurator_run_my_doc/TestTemplateItem/testRunMyDocConfigurationWorkflow.py
View file @
3d5aa9e4
##############################################################################
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Gabriel M. Monnerat <gabriel@tiolive.com>
# Gabriel M. Monnerat <gabriel@tiolive.com>
# Xavier Hardy <xavier.hardy@tiolive.com>
# Xavier Hardy <xavier.hardy@tiolive.com>
...
@@ -304,34 +305,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(ERP5TypeTestCase):
...
@@ -304,34 +305,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(ERP5TypeTestCase):
runmydocs_preference
=
self
.
portal
.
portal_preferences
.
runmydocs_preference
runmydocs_preference
=
self
.
portal
.
portal_preferences
.
runmydocs_preference
self
.
assertEquals
(
runmydocs_preference
.
getPreferenceState
(),
"global"
)
self
.
assertEquals
(
runmydocs_preference
.
getPreferenceState
(),
"global"
)
""" def _stepCheckWebSiteRoles(self):
# Check permission of Web Site with normal user
self.portal.web_page_module.ERP5Site_createNewWebDocument("web_page_template")
self.stepTic()
result_list = self.portal.web_site_module.runmydocs.WebSection_getWebPageObjectList()
self.assertEquals(len(result_list), 1)
self.assertEquals(result_list[0].getTitle(), "Web Page")
new_object = self.portal.web_page_module.newContent(portal_type="Web Page")
new_object.edit(title="New")
new_object = self.portal.web_page_module.newContent(portal_type="Web Table")
new_object.edit(title="New")
new_object = self.portal.web_page_module.newContent(portal_type="Web Illustration")
new_object.edit(title="New")
self.stepTic()
kw = {"portal_type": "Web Page", "title": "New"}
result_list = self.portal.web_site_module.runmydocs.WebSection_getWebPageObjectList(**kw)
self.assertEquals(len(result_list), 1)
self.assertEquals(result_list[0].getPortalType(), "Web Page")
kw["portal_type"] = "Web Illustration"
result_list = self.portal.web_site_module.runmydocs.WebSection_getWebPageObjectList(**kw)
self.assertEquals(len(result_list), 1)
self.assertEquals(result_list[0].getPortalType(), "Web Illustration")
kw["portal_type"] = "Web Table"
result_list = self.portal.web_site_module.runmydocs.WebSection_getWebPageObjectList(**kw)
self.assertEquals(len(result_list), 1)
self.assertEquals(result_list[0].getPortalType(), "Web Table")
"""
def
_stepCheckKnowledgePadRole
(
self
):
def
_stepCheckKnowledgePadRole
(
self
):
""" Check if Knowledge Pad is configured correctly """
""" Check if Knowledge Pad is configured correctly """
pad
=
self
.
portal
.
knowledge_pad_module
.
newContent
(
portal_type
=
"Knowledge Pad"
)
pad
=
self
.
portal
.
knowledge_pad_module
.
newContent
(
portal_type
=
"Knowledge Pad"
)
...
@@ -417,50 +390,6 @@ class TestRunMyDocsConfiguratorWorkflowFranceLanguage(TestRunMyDocsConfiguratorW
...
@@ -417,50 +390,6 @@ class TestRunMyDocsConfiguratorWorkflowFranceLanguage(TestRunMyDocsConfiguratorW
]
]
self
.
_stepSetupMultipleUserAccountThree
(
sequence
,
user_list
)
self
.
_stepSetupMultipleUserAccountThree
(
sequence
,
user_list
)
""" def stepSetupWebSiteConfiguration(self, sequence=None, sequence_list=None, **kw):
# Setup Web Site
next_dict = dict(your_default_available_language="fr")
sequence.edit(next_dict=next_dict)
def stepCheckRunMyDocsWebSiteAfterInstallation(self, sequence=None, sequence_list=None, **kw):
# Check if RunMyDocs Web Site is published and your language
runmydocs_web_site = self.portal.web_site_module.runmydocs
portal_catalog = self.portal.portal_catalog
self.assertEquals(runmydocs_web_site.getValidationState(),
"published")
self.assertEquals(runmydocs_web_site.getDefaultAvailableLanguage(),
"fr")
person = portal_catalog.getResultValue(portal_type="Person",
reference="french_creator")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Creator')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
person = portal_catalog.getResultValue(portal_type="Person",
reference="french_assignee")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Assignee')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
person = portal_catalog.getResultValue(portal_type="Person",
reference="french_assignor")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Assignor')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
def stepCheckWebSiteRoles(self, sequence=None, sequence_list=None, **kw):
# Check permission of Web Site with normal user
self.login("french_assignor")
self._stepCheckWebSiteRoles()
"""
def
stepCheckKnowledgePadRole
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepCheckKnowledgePadRole
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
self
.
login
(
"french_creator"
)
self
.
login
(
"french_creator"
)
self
.
_stepCheckKnowledgePadRole
()
self
.
_stepCheckKnowledgePadRole
()
...
@@ -482,11 +411,6 @@ class TestRunMyDocsConfiguratorWorkflowBrazilLanguage(TestRunMyDocsConfiguratorW
...
@@ -482,11 +411,6 @@ class TestRunMyDocsConfiguratorWorkflowBrazilLanguage(TestRunMyDocsConfiguratorW
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
""" def stepSetupWebSiteConfiguration(self, sequence=None, sequence_list=None, **kw):
# Setup Web Site
next_dict = dict(your_default_available_language="pt-BR")
sequence.edit(next_dict=next_dict)
"""
def
stepSetupMultipleUserAccountThree
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepSetupMultipleUserAccountThree
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Create multiple user account """
""" Create multiple user account """
user_list
=
[
user_list
=
[
...
@@ -518,44 +442,6 @@ class TestRunMyDocsConfiguratorWorkflowBrazilLanguage(TestRunMyDocsConfiguratorW
...
@@ -518,44 +442,6 @@ class TestRunMyDocsConfiguratorWorkflowBrazilLanguage(TestRunMyDocsConfiguratorW
]
]
self
.
_stepSetupMultipleUserAccountThree
(
sequence
,
user_list
)
self
.
_stepSetupMultipleUserAccountThree
(
sequence
,
user_list
)
""" def stepCheckRunMyDocsWebSiteAfterInstallation(self, sequence=None, sequence_list=None, **kw):
# Check if RunMyDocs Web Site is published and your language
runmydocs_web_site = self.portal.web_site_module.runmydocs
portal_catalog = self.portal.portal_catalog
self.assertEquals(runmydocs_web_site.getValidationState(),
"published")
self.assertEquals(runmydocs_web_site.getDefaultAvailableLanguage(),
"pt-BR")
person = portal_catalog.getResultValue(portal_type="Person",
reference="person_creator")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Creator')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
person = portal_catalog.getResultValue(portal_type="Person",
reference="person_assignee")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Assignee')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
person = portal_catalog.getResultValue(portal_type="Person",
reference="person_assignor")
self.assertEquals(person.getValidationState(), 'validated')
self.assertEquals(person.getFirstName(), 'Person')
self.assertEquals(person.getLastName(), 'Assignor')
assignment = person.contentValues(portal_type="Assignment")[0]
self.assertEquals(assignment.getValidationState(), "open")
self.assertEquals(assignment.getFunction(), "runmydocs_user")
def stepCheckWebSiteRoles(self, sequence=None, sequence_list=None, **kw):
# Check permission of Web Site with normal user
self.login("person_assignor")
self._stepCheckWebSiteRoles()
"""
def
stepCheckKnowledgePadRole
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepCheckKnowledgePadRole
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
self
.
login
(
"person_creator"
)
self
.
login
(
"person_creator"
)
self
.
_stepCheckKnowledgePadRole
()
self
.
_stepCheckKnowledgePadRole
()
...
...
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