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
Labels
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
0173ec07
Commit
0173ec07
authored
Nov 02, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Minor testing fixups
See merge request
!444
parents
3bf365c0
d34d3844
Pipeline
#24528
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+5
-0
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
...ortal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
+7
-2
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
0173ec07
...
@@ -1876,9 +1876,14 @@ class TestSlapOSPerson_getSlapOSPendingTicket(TestCRMSkinsMixin):
...
@@ -1876,9 +1876,14 @@ class TestSlapOSPerson_getSlapOSPendingTicket(TestCRMSkinsMixin):
class
TestSlapOSPerson_getSlapOSPendingTicketMessageTemplate
(
TestCRMSkinsMixin
):
class
TestSlapOSPerson_getSlapOSPendingTicketMessageTemplate
(
TestCRMSkinsMixin
):
@
simulate
(
'NotificationTool_getDocumentValue'
,
'reference=None'
,
'assert reference == "slapos-crm-person-pending-ticket-notification"
\
n
'
\
'return None'
)
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return range(99)'
)
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return range(99)'
)
def
test_getSlapOSPendingTicketMessageTemplate
(
self
):
def
test_getSlapOSPendingTicketMessageTemplate
(
self
):
person
=
self
.
makePerson
()
person
=
self
.
makePerson
()
# Test without notification message
title
,
message
=
person
.
Person_getSlapOSPendingTicketMessageTemplate
()
title
,
message
=
person
.
Person_getSlapOSPendingTicketMessageTemplate
()
self
.
assertEqual
(
""" You have 99 pending tickets """
,
title
)
self
.
assertEqual
(
""" You have 99 pending tickets """
,
title
)
self
.
assertEqual
(
""" You have 99 pending tickets """
,
message
)
self
.
assertEqual
(
""" You have 99 pending tickets """
,
message
)
...
...
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
View file @
0173ec07
...
@@ -1020,6 +1020,12 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
...
@@ -1020,6 +1020,12 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
person
=
self
.
_makePerson
()
person
=
self
.
_makePerson
()
base
=
self
.
portal
.
web_site_module
.
hostingjs
base
=
self
.
portal
.
web_site_module
.
hostingjs
# On certain environments or sub-projects this value
# can be customized.
slapos_master_web_url
=
base
.
getLayoutProperty
(
"configuration_slapos_master_web_url"
,
default
=
base
.
absolute_url
())
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
token_dict
=
json
.
loads
(
base
.
Base_getComputeNodeToken
())
token_dict
=
json
.
loads
(
base
.
Base_getComputeNodeToken
())
...
@@ -1029,7 +1035,7 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
...
@@ -1029,7 +1035,7 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
self
.
assertEqual
(
token_dict
[
'command_line'
],
"wget https://deploy.erp5.net/slapos ; bash slapos"
)
self
.
assertEqual
(
token_dict
[
'command_line'
],
"wget https://deploy.erp5.net/slapos ; bash slapos"
)
self
.
assertIn
(
"%s-"
%
(
DateTime
().
strftime
(
"%Y%m%d"
))
,
token_dict
[
'access_token'
])
self
.
assertIn
(
"%s-"
%
(
DateTime
().
strftime
(
"%Y%m%d"
))
,
token_dict
[
'access_token'
])
self
.
assertEqual
(
token_dict
[
'slapos_master_api'
],
"https://slap.vifib.com"
)
self
.
assertEqual
(
token_dict
[
'slapos_master_api'
],
"https://slap.vifib.com"
)
self
.
assertEqual
(
token_dict
[
'slapos_master_web'
],
base
.
absolute_url
()
)
self
.
assertEqual
(
token_dict
[
'slapos_master_web'
],
slapos_master_web_url
)
self
.
login
()
self
.
login
()
token
=
self
.
portal
.
access_token_module
[
token_dict
[
"access_token"
]]
token
=
self
.
portal
.
access_token_module
[
token_dict
[
"access_token"
]]
...
@@ -1039,7 +1045,6 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
...
@@ -1039,7 +1045,6 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
self
.
assertEqual
(
token
.
getAgentValue
(),
person
)
self
.
assertEqual
(
token
.
getAgentValue
(),
person
)
self
.
assertEqual
(
"One Time Restricted Access Token"
,
token
.
getPortalType
())
self
.
assertEqual
(
"One Time Restricted Access Token"
,
token
.
getPortalType
())
class
TestInstanceTree_edit
(
TestSlapOSHalJsonStyleMixin
):
class
TestInstanceTree_edit
(
TestSlapOSHalJsonStyleMixin
):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
...
...
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