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
0173ec07
Commit
0173ec07
authored
Nov 02, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Minor testing fixups
See merge request
nexedi/slapos.core!444
parents
3bf365c0
d34d3844
Changes
2
Hide 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):
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)'
)
def
test_getSlapOSPendingTicketMessageTemplate
(
self
):
person
=
self
.
makePerson
()
# Test without notification message
title
,
message
=
person
.
Person_getSlapOSPendingTicketMessageTemplate
()
self
.
assertEqual
(
""" You have 99 pending tickets """
,
title
)
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):
person
=
self
.
_makePerson
()
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
())
token_dict
=
json
.
loads
(
base
.
Base_getComputeNodeToken
())
...
...
@@ -1029,7 +1035,7 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
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
.
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
()
token
=
self
.
portal
.
access_token_module
[
token_dict
[
"access_token"
]]
...
...
@@ -1039,7 +1045,6 @@ class TestBase_getComputeNodeToken(TestSlapOSHalJsonStyleMixin):
self
.
assertEqual
(
token
.
getAgentValue
(),
person
)
self
.
assertEqual
(
"One Time Restricted Access Token"
,
token
.
getPortalType
())
class
TestInstanceTree_edit
(
TestSlapOSHalJsonStyleMixin
):
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