Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Léo-Paul Géneau
slapos.core
Commits
302ec02d
Commit
302ec02d
authored
Jun 15, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Add test for Person_testLoginExistence
parent
e071b05e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
...ortal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
+28
-0
No files found.
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
View file @
302ec02d
...
@@ -677,6 +677,34 @@ class TestPerson_get_revoke_Certificate(TestSlapOSHalJsonStyleMixin):
...
@@ -677,6 +677,34 @@ class TestPerson_get_revoke_Certificate(TestSlapOSHalJsonStyleMixin):
self
.
assertEqual
(
response_dict
[
"common_name"
],
person
.
getUserId
())
self
.
assertEqual
(
response_dict
[
"common_name"
],
person
.
getUserId
())
self
.
assertEqual
(
self
.
portal
.
REQUEST
.
RESPONSE
.
getStatus
(),
200
)
self
.
assertEqual
(
self
.
portal
.
REQUEST
.
RESPONSE
.
getStatus
(),
200
)
class
TestPerson_testLoginExistence
(
TestSlapOSHalJsonStyleMixin
):
def
test_Person_testLoginExistence
(
self
,
portal_type
=
"ERP5 Login"
):
person
=
self
.
_makePerson
(
user
=
0
)
self
.
assertFalse
(
person
.
Person_testLoginExistence
(
reference
=
"oqidjqosidjqoisdjqsoijdqs"
))
self
.
assertFalse
(
person
.
Person_testLoginExistence
(
reference
=
person
.
getUserId
()))
login
=
self
.
generateNewId
()
login_doc
=
person
.
newContent
(
portal_type
=
portal_type
,
reference
=
login
)
login_doc
.
validate
()
self
.
tic
()
self
.
changeSkin
(
"Hal"
)
self
.
assertFalse
(
person
.
Person_testLoginExistence
(
reference
=
person
.
getUserId
()))
self
.
assertTrue
(
person
.
Person_testLoginExistence
(
reference
=
login
))
login_doc
.
invalidate
()
self
.
tic
()
self
.
changeSkin
(
"Hal"
)
self
.
assertFalse
(
person
.
Person_testLoginExistence
(
reference
=
login
))
def
test_Person_testLoginExistence_google
(
self
):
self
.
test_Person_testLoginExistence
(
portal_type
=
"Google Login"
)
def
test_Person_testLoginExistence_facebook
(
self
):
self
.
test_Person_testLoginExistence
(
portal_type
=
"Facebook Login"
)
...
...
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