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
Rafael Monnerat
slapos.core
Commits
eabd7e10
Commit
eabd7e10
authored
Jan 14, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: More fixes
parent
56136733
Pipeline
#19298
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
...ortal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
+17
-8
No files found.
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
View file @
eabd7e10
...
@@ -239,9 +239,12 @@ class TestSoftwareInstance_getNewsDict(TestSlapOSHalJsonStyleMixin):
...
@@ -239,9 +239,12 @@ class TestSoftwareInstance_getNewsDict(TestSlapOSHalJsonStyleMixin):
def
test_no_data
(
self
):
def
test_no_data
(
self
):
instance
=
self
.
_makeInstance
()
instance
=
self
.
_makeInstance
()
news_dict
=
instance
.
SoftwareInstance_getNewsDict
()
news_dict
=
instance
.
SoftwareInstance_getNewsDict
()
expected_news_dict
=
{
'no_data'
:
1
,
expected_news_dict
=
{
'created_at'
:
self
.
created_at
,
'text'
:
'#error no data found for %s'
%
instance
.
getReference
(),
'no_data'
:
1
,
'user'
:
'SlapOS Master'
}
'since'
:
self
.
created_at
,
'state'
:
''
,
'text'
:
'#error no data found for %s'
%
instance
.
getReference
(),
'user'
:
'SlapOS Master'
}
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
# Ensure it don't raise error when converting to JSON
# Ensure it don't raise error when converting to JSON
json
.
dumps
(
news_dict
)
json
.
dumps
(
news_dict
)
...
@@ -338,9 +341,12 @@ class TestSoftwareInstallation_getNewsDict(TestSlapOSHalJsonStyleMixin):
...
@@ -338,9 +341,12 @@ class TestSoftwareInstallation_getNewsDict(TestSlapOSHalJsonStyleMixin):
def
test_no_data
(
self
):
def
test_no_data
(
self
):
installation
=
self
.
_makeSoftwareInstallation
()
installation
=
self
.
_makeSoftwareInstallation
()
news_dict
=
installation
.
SoftwareInstallation_getNewsDict
()
news_dict
=
installation
.
SoftwareInstallation_getNewsDict
()
expected_news_dict
=
{
'no_data'
:
1
,
expected_news_dict
=
{
'created_at'
:
self
.
created_at
,
'text'
:
'#error no data found for %s'
%
installation
.
getReference
(),
'no_data'
:
1
,
'user'
:
'SlapOS Master'
}
'since'
:
self
.
created_at
,
'state'
:
''
,
'text'
:
'#error no data found for %s'
%
installation
.
getReference
(),
'user'
:
'SlapOS Master'
}
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
# Ensure it don't raise error when converting to JSON
# Ensure it don't raise error when converting to JSON
json
.
dumps
(
news_dict
)
json
.
dumps
(
news_dict
)
...
@@ -411,9 +417,12 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
...
@@ -411,9 +417,12 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
compute_node
=
self
.
_makeComputeNode
()
compute_node
=
self
.
_makeComputeNode
()
news_dict
=
compute_node
.
ComputeNode_getNewsDict
()
news_dict
=
compute_node
.
ComputeNode_getNewsDict
()
expected_news_dict
=
{
'compute_node'
:
expected_news_dict
=
{
'compute_node'
:
{
'no_data'
:
1
,
{
'created_at'
:
self
.
created_at
,
'no_data'
:
1
,
'since'
:
self
.
created_at
,
'state'
:
''
,
'text'
:
'#error no data found for %s'
%
compute_node
.
getReference
(),
'text'
:
'#error no data found for %s'
%
compute_node
.
getReference
(),
'user'
:
'SlapOS Master'
},
'user'
:
'SlapOS Master'
},
'partition'
:
{}
'partition'
:
{}
}
}
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
self
.
assertEqual
(
news_dict
,
expected_news_dict
)
...
...
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