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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
7f1f5c5a
Commit
7f1f5c5a
authored
Jun 08, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for Base_getDefaultAssignmentArgumentDict
parent
ce2458d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
4 deletions
+35
-4
product/ERP5/tests/testERP5Credential.py
product/ERP5/tests/testERP5Credential.py
+35
-4
No files found.
product/ERP5/tests/testERP5Credential.py
View file @
7f1f5c5a
...
...
@@ -722,7 +722,8 @@ class TestERP5Credential(ERP5TypeTestCase):
last_name
=
"Monnerat"
,
reference
=
"gabriel"
,
password
=
"123"
,
default_email_text
=
"gabriel@test.com"
):
default_email_text
=
"gabriel@test.com"
,
role
=
"client"
):
self
.
logout
()
self
.
portal
.
ERP5Site_registerCredentialRequest
(
first_name
=
first_name
,
last_name
=
last_name
,
...
...
@@ -733,7 +734,8 @@ class TestERP5Credential(ERP5TypeTestCase):
default_telephone_text
=
"223344"
,
default_address_street_address
=
"Test Street"
,
default_address_city
=
"Campos"
,
default_address_zip_code
=
"28024030"
)
default_address_zip_code
=
"28024030"
,
role
=
role
)
self
.
login
(
"ERP5TypeTestCase"
)
self
.
stepTic
()
...
...
@@ -760,12 +762,12 @@ class TestERP5Credential(ERP5TypeTestCase):
sequence_string
=
'stepSetCredentialRequestAutomaticApprovalPreferences '
\
'CreateCredentialRequestSample '
\
'CheckIfMailMessageWasPosted '
\
'stepUnSetCredentialAutomaticApprovalPreferences'
\
'stepUnSetCredentialAutomaticApprovalPreferences'
\
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test
_
MailFromMailMessageEvent
(
self
):
def
testMailFromMailMessageEvent
(
self
):
""" """
self
.
stepSetCredentialRequestAutomaticApprovalPreferences
()
self
.
_createCredentialRequest
(
first_name
=
"Vifib"
,
...
...
@@ -803,6 +805,11 @@ class TestERP5Credential(ERP5TypeTestCase):
self.login("
ERP5TypeTestCase
")
self.stepTic()
person = portal_catalog.getResultValue(reference="
gabriel
", portal_type="
Person
")
assignment_list = person.objectValues(portal_type="
Assignment
")
self.assertNotEquals(assignment_list, [])
self.assertEquals(len(assignment_list), 1)
assignment = assignment_list[0]
self.assertEquals(assignment.getValidationState(), "
open
")
self.assertEquals(person.getValidationState(), "
validated
")
self.stepUnSetCredentialAutomaticApprovalPreferences()
...
...
@@ -818,6 +825,30 @@ class TestERP5Credential(ERP5TypeTestCase):
self.assertEquals(credential_request.getDefaultEmailText(), "
gabriel
@
test
.
com
")
self.stepUnSetCredentialAutomaticApprovalPreferences()
def testOverwriteBase_getDefaultAssignmentArgumentDict(self):
portal_catalog = self.portal.portal_catalog
portal_skins = self.getSkinsTool()
script = portal_skins.erp5_credential.Base_getDefaultAssignmentArgumentDict
self.login("
ERP5TypeTestCase
")
script.ZPythonScript_edit("
**
kw
",
"
return
dict
(
role_list
=
[
'internal'
,],
function_list
=
[
'member'
,])
")
self.logout()
self.stepSetCredentialRequestAutomaticApprovalPreferences()
self._createCredentialRequest(role=None)
credential_request = portal_catalog.getResultValue(portal_type="
Credential
Request
",
reference="
gabriel
")
mail_message = portal_catalog.getResultValue(portal_type="
Mail
Message
",
follow_up=credential_request)
self.logout()
self.portal.ERP5Site_activeLogin(mail_message.getReference())
self.login("
ERP5TypeTestCase
")
self.stepTic()
person = portal_catalog.getResultValue(reference="
gabriel
", portal_type="
Person
")
assignment_list = person.objectValues(portal_type="
Assignment
")
assignment = assignment_list[0]
self.assertEquals(assignment.getFunction(), "
member
")
self.assertEquals(assignment.getRole(), "
internal
")
def test_xx_checkCredentialQuestionIsNotCaseSensitive(self):
'''
check that if the user enter an answer with a diffent case, this will still
...
...
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