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
18
Merge Requests
18
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
ae610908
Commit
ae610908
authored
Aug 02, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_slap_tool: testSlapOSSlapTool use person.getUserId instead person.getReference
parent
11bdc499
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
33 deletions
+61
-33
master/bt5/slapos_slap_tool/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSSlapTool.xml
...eItem/portal_components/extension.erp5.SlapOSSlapTool.xml
+30
-3
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+22
-21
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
...teItem/portal_components/test.erp5.testSlapOSSlapTool.xml
+9
-9
No files found.
master/bt5/slapos_slap_tool/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSSlapTool.xml
View file @
ae610908
...
@@ -6,10 +6,22 @@
...
@@ -6,10 +6,22 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SlapOSSlapTool
</string>
</value>
<value>
<string>
SlapOSSlapTool
</string>
</value>
</item>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.SlapOSSlapTool
</string>
</value>
<value>
<string>
extension.erp5.SlapOSSlapTool
</string>
</value>
...
@@ -43,13 +55,28 @@
...
@@ -43,13 +55,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -62,7 +89,7 @@
...
@@ -62,7 +89,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -71,7 +98,7 @@
...
@@ -71,7 +98,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
ae610908
...
@@ -2141,10 +2141,11 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2141,10 +2141,11 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
person
.
recursiveImmediateReindexObject
()
person
.
recursiveImmediateReindexObject
()
self
.
person
=
person
self
.
person
=
person
self
.
person_reference
=
person
.
getReference
()
self
.
person_reference
=
person
.
getReference
()
self
.
person_user_id
=
person
.
getUserId
()
TestSlapOSSlapToolMixin
.
afterSetUp
(
self
,
person
=
person
)
TestSlapOSSlapToolMixin
.
afterSetUp
(
self
,
person
=
person
)
def
test_not_accessed_getComputerStatus
(
self
):
def
test_not_accessed_getComputerStatus
(
self
):
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
...
@@ -2185,7 +2186,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2185,7 +2186,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_accessed_getComputerStatus
(
self
):
def
test_accessed_getComputerStatus
(
self
):
self
.
login
(
self
.
computer_id
)
self
.
login
(
self
.
computer_id
)
self
.
portal_slap
.
getFullComputerInformation
(
self
.
computer_id
)
self
.
portal_slap
.
getFullComputerInformation
(
self
.
computer_id
)
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
...
@@ -2233,7 +2234,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2233,7 +2234,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
'recmethod'
:
'reportComputerBang'
}])
'recmethod'
:
'reportComputerBang'
}])
def
test_computerBang
(
self
):
def
test_computerBang
(
self
):
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
computer_bang_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
computer_bang_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
computer
.
reportComputerBang
=
Simulator
(
self
.
computer
.
reportComputerBang
=
Simulator
(
...
@@ -2276,7 +2277,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2276,7 +2277,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_getComputerPartitionStatus
(
self
):
def
test_getComputerPartitionStatus
(
self
):
self
.
_makeComplexComputer
()
self
.
_makeComplexComputer
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
...
@@ -2319,13 +2320,13 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2319,13 +2320,13 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_getComputerPartitionStatus_visited
(
self
):
def
test_getComputerPartitionStatus_visited
(
self
):
self
.
_makeComplexComputer
(
person
=
self
.
person
)
self
.
_makeComplexComputer
(
person
=
self
.
person
)
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
self
.
login
(
self
.
start_requested_software_instance
.
getReference
())
self
.
login
(
self
.
start_requested_software_instance
.
getReference
())
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
partition_id
)
partition_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
...
@@ -2368,7 +2369,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2368,7 +2369,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self
.
_makeComplexComputer
(
person
=
self
.
person
,
with_slave
=
True
)
self
.
_makeComplexComputer
(
person
=
self
.
person
,
with_slave
=
True
)
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
response
=
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
response
=
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
'public, max-age=1, stale-if-error=604800'
,
self
.
assertEqual
(
'public, max-age=1, stale-if-error=604800'
,
...
@@ -2500,7 +2501,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2500,7 +2501,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self
.
_makeComplexComputer
(
person
=
self
.
person
)
self
.
_makeComplexComputer
(
person
=
self
.
person
)
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
response
=
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
response
=
self
.
portal_slap
.
registerComputerPartition
(
self
.
computer_id
,
partition_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
'public, max-age=1, stale-if-error=604800'
,
self
.
assertEqual
(
'public, max-age=1, stale-if-error=604800'
,
...
@@ -2623,7 +2624,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2623,7 +2624,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
try
:
try
:
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
start_requested_software_instance
.
bang
=
Simulator
(
self
.
start_requested_software_instance
.
bang
=
Simulator
(
self
.
instance_bang_simulator
,
'bang'
)
self
.
instance_bang_simulator
,
'bang'
)
error_log
=
'Please bang me'
error_log
=
'Please bang me'
...
@@ -2662,7 +2663,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2662,7 +2663,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
finally
:
finally
:
if
os
.
path
.
exists
(
self
.
instance_bang_simulator
):
if
os
.
path
.
exists
(
self
.
instance_bang_simulator
):
os
.
unlink
(
self
.
instance_bang_simulator
)
os
.
unlink
(
self
.
instance_bang_simulator
)
def
assertInstanceRenameSimulator
(
self
,
args
,
kwargs
):
def
assertInstanceRenameSimulator
(
self
,
args
,
kwargs
):
stored
=
eval
(
open
(
self
.
instance_rename_simulator
).
read
())
stored
=
eval
(
open
(
self
.
instance_rename_simulator
).
read
())
# do the same translation magic as in workflow
# do the same translation magic as in workflow
...
@@ -2676,7 +2677,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2676,7 +2677,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
try
:
try
:
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
portal_type
=
'Computer Partition'
).
getReference
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
start_requested_software_instance
.
rename
=
Simulator
(
self
.
start_requested_software_instance
.
rename
=
Simulator
(
self
.
instance_rename_simulator
,
'rename'
)
self
.
instance_rename_simulator
,
'rename'
)
new_name
=
'new me'
new_name
=
'new me'
...
@@ -2700,7 +2701,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2700,7 +2701,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_request_withSlave
(
self
):
def
test_request_withSlave
(
self
):
self
.
instance_request_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
instance_request_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
person
.
requestSoftwareInstance
=
Simulator
(
self
.
person
.
requestSoftwareInstance
=
Simulator
(
self
.
instance_request_simulator
,
'requestSoftwareInstance'
)
self
.
instance_request_simulator
,
'requestSoftwareInstance'
)
response
=
self
.
portal_slap
.
requestComputerPartition
(
response
=
self
.
portal_slap
.
requestComputerPartition
(
...
@@ -2730,7 +2731,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2730,7 +2731,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_request
(
self
):
def
test_request
(
self
):
self
.
instance_request_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
instance_request_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
person
.
requestSoftwareInstance
=
Simulator
(
self
.
person
.
requestSoftwareInstance
=
Simulator
(
self
.
instance_request_simulator
,
'requestSoftwareInstance'
)
self
.
instance_request_simulator
,
'requestSoftwareInstance'
)
response
=
self
.
portal_slap
.
requestComputerPartition
(
response
=
self
.
portal_slap
.
requestComputerPartition
(
...
@@ -2766,7 +2767,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2766,7 +2767,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self
.
_makeComplexComputer
(
person
=
self
.
person
)
self
.
_makeComplexComputer
(
person
=
self
.
person
)
self
.
start_requested_software_instance
.
updateLocalRolesOnSecurityGroups
()
self
.
start_requested_software_instance
.
updateLocalRolesOnSecurityGroups
()
self
.
tic
()
self
.
tic
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
response
=
self
.
portal_slap
.
requestComputerPartition
(
response
=
self
.
portal_slap
.
requestComputerPartition
(
software_release
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
...
@@ -2857,7 +2858,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2857,7 +2858,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_computerSupply
(
self
):
def
test_computerSupply
(
self
):
self
.
computer_supply_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
computer_supply_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
computer
.
requestSoftwareRelease
=
Simulator
(
self
.
computer
.
requestSoftwareRelease
=
Simulator
(
self
.
computer_supply_simulator
,
'requestSoftwareRelease'
)
self
.
computer_supply_simulator
,
'requestSoftwareRelease'
)
software_url
=
'live_test_url_%s'
%
self
.
generateNewId
()
software_url
=
'live_test_url_%s'
%
self
.
generateNewId
()
...
@@ -2884,7 +2885,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2884,7 +2885,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_requestComputer
(
self
):
def
test_requestComputer
(
self
):
self
.
computer_request_computer_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
computer_request_computer_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
person
.
requestComputer
=
Simulator
(
self
.
person
.
requestComputer
=
Simulator
(
self
.
computer_request_computer_simulator
,
'requestComputer'
)
self
.
computer_request_computer_simulator
,
'requestComputer'
)
...
@@ -2932,7 +2933,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2932,7 +2933,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_generateComputerCertificate
(
self
):
def
test_generateComputerCertificate
(
self
):
self
.
generate_computer_certificate_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
generate_computer_certificate_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
computer
.
generateCertificate
=
Simulator
(
self
.
computer
.
generateCertificate
=
Simulator
(
self
.
generate_computer_certificate_simulator
,
self
.
generate_computer_certificate_simulator
,
'generateComputerCertificate'
)
'generateComputerCertificate'
)
...
@@ -2979,9 +2980,9 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2979,9 +2980,9 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_revokeComputerCertificate
(
self
):
def
test_revokeComputerCertificate
(
self
):
self
.
revoke_computer_certificate_simulator
=
tempfile
.
mkstemp
()[
1
]
self
.
revoke_computer_certificate_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
try
:
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
computer
.
revokeCertificate
=
Simulator
(
self
.
computer
.
revokeCertificate
=
Simulator
(
self
.
revoke_computer_certificate_simulator
,
self
.
revoke_computer_certificate_simulator
,
'revokeComputerCertificate'
)
'revokeComputerCertificate'
)
response
=
self
.
portal_slap
.
revokeComputerCertificate
(
self
.
computer_id
)
response
=
self
.
portal_slap
.
revokeComputerCertificate
(
self
.
computer_id
)
...
@@ -2998,7 +2999,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2998,7 +2999,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
if
preference
.
getPreferenceState
()
==
'global'
:
if
preference
.
getPreferenceState
()
==
'global'
:
preference
.
setPreferredHateoasUrl
(
''
)
preference
.
setPreferredHateoasUrl
(
''
)
self
.
tic
()
self
.
tic
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
self
.
assertRaises
(
NotFound
,
self
.
portal_slap
.
getHateoasUrl
)
self
.
assertRaises
(
NotFound
,
self
.
portal_slap
.
getHateoasUrl
)
def
test_getHateoasUrl
(
self
):
def
test_getHateoasUrl
(
self
):
...
@@ -3008,7 +3009,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -3008,7 +3009,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
if
preference
.
getPreferenceState
()
==
'global'
:
if
preference
.
getPreferenceState
()
==
'global'
:
preference
.
setPreferredHateoasUrl
(
'foo'
)
preference
.
setPreferredHateoasUrl
(
'foo'
)
self
.
tic
()
self
.
tic
()
self
.
login
(
self
.
person_
reference
)
self
.
login
(
self
.
person_
user_id
)
response
=
self
.
portal_slap
.
getHateoasUrl
()
response
=
self
.
portal_slap
.
getHateoasUrl
()
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
'foo'
,
response
.
body
)
self
.
assertEqual
(
'foo'
,
response
.
body
)
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
View file @
ae610908
...
@@ -55,15 +55,15 @@
...
@@ -55,15 +55,15 @@
<string>
W:1514, 13: Use of eval (eval-used)
</string>
<string>
W:1514, 13: Use of eval (eval-used)
</string>
<string>
W:1568, 13: Use of eval (eval-used)
</string>
<string>
W:1568, 13: Use of eval (eval-used)
</string>
<string>
W:1608, 13: Use of eval (eval-used)
</string>
<string>
W:1608, 13: Use of eval (eval-used)
</string>
<string>
W:2
015
, 2: Arguments number differs from overridden \'afterSetUp\' method (arguments-differ)
</string>
<string>
W:2
132
, 2: Arguments number differs from overridden \'afterSetUp\' method (arguments-differ)
</string>
<string>
W:2
111
, 13: Use of eval (eval-used)
</string>
<string>
W:2
229
, 13: Use of eval (eval-used)
</string>
<string>
W:2
496
, 13: Use of eval (eval-used)
</string>
<string>
W:2
614
, 13: Use of eval (eval-used)
</string>
<string>
W:2
550
, 13: Use of eval (eval-used)
</string>
<string>
W:2
668
, 13: Use of eval (eval-used)
</string>
<string>
W:2
577
, 13: Use of eval (eval-used)
</string>
<string>
W:2
695
, 13: Use of eval (eval-used)
</string>
<string>
W:2
732
, 13: Use of eval (eval-used)
</string>
<string>
W:2
850
, 13: Use of eval (eval-used)
</string>
<string>
W:2
760
, 13: Use of eval (eval-used)
</string>
<string>
W:2
878
, 13: Use of eval (eval-used)
</string>
<string>
W:2
809
, 13: Use of eval (eval-used)
</string>
<string>
W:2
927
, 13: Use of eval (eval-used)
</string>
<string>
W:2
856
, 13: Use of eval (eval-used)
</string>
<string>
W:2
974
, 13: Use of eval (eval-used)
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
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