Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Xavier Thompson
slapos
Commits
bdea823b
Commit
bdea823b
authored
Dec 27, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/erp5/test: make utility methods classmethod
so that we can use them in setUpClass
parent
2023e1bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
software/erp5/test/test/__init__.py
software/erp5/test/test/__init__.py
+10
-7
No files found.
software/erp5/test/test/__init__.py
View file @
bdea823b
...
...
@@ -49,17 +49,20 @@ def setUpModule():
class
ERP5InstanceTestCase
(
SlapOSInstanceTestCase
):
"""ERP5 base test case
"""
def
getRootPartitionConnectionParameterDict
(
self
):
@
classmethod
def
getRootPartitionConnectionParameterDict
(
cls
):
"""Return the output paramters from the root partition"""
return
json
.
loads
(
self
.
computer_partition
.
getConnectionParameterDict
()[
'_'
])
cls
.
computer_partition
.
getConnectionParameterDict
()[
'_'
])
def
getComputerPartition
(
self
,
partition_reference
):
for
computer_partition
in
self
.
slap
.
computer
.
getComputerPartitionList
():
@
classmethod
def
getComputerPartition
(
cls
,
partition_reference
):
for
computer_partition
in
cls
.
slap
.
computer
.
getComputerPartitionList
():
if
partition_reference
==
computer_partition
.
getInstanceParameter
(
'instance_title'
):
return
computer_partition
def
getComputerPartitionPath
(
self
,
partition_reference
):
partition_id
=
self
.
getComputerPartition
(
partition_reference
).
getId
()
return
os
.
path
.
join
(
self
.
slap
.
_instance_root
,
partition_id
)
@
classmethod
def
getComputerPartitionPath
(
cls
,
partition_reference
):
partition_id
=
cls
.
getComputerPartition
(
partition_reference
).
getId
()
return
os
.
path
.
join
(
cls
.
slap
.
_instance_root
,
partition_id
)
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