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
Titouan Soulard
slapos.core
Commits
ed9a2f69
Commit
ed9a2f69
authored
Aug 01, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_slap_tool: test: bypass subscription request
parent
7b87d2be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+12
-11
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
ed9a2f69
# -*- coding: utf-8 -*-
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
,
TemporaryAlarmScript
from
DateTime
import
DateTime
from
App.Common
import
rfc1123_date
...
...
@@ -3112,16 +3112,17 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self
.
start_requested_software_instance
.
updateLocalRolesOnSecurityGroups
()
self
.
tic
()
self
.
login
(
self
.
person_user_id
)
response
=
self
.
portal_slap
.
requestComputerPartition
(
software_release
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
partition_reference
=
self
.
start_requested_software_instance
.
getTitle
(),
partition_parameter_xml
=
'<marshal><dictionary id="i2"/></marshal>'
,
filter_xml
=
'<marshal><dictionary id="i2"/></marshal>'
,
state
=
'<marshal><string>started</string></marshal>'
,
shared_xml
=
'<marshal><bool>0</bool></marshal>'
,
project_reference
=
self
.
project
.
getReference
()
)
with
TemporaryAlarmScript
(
self
.
portal
,
'Item_getSubscriptionStatus'
,
"'subscribed'"
):
response
=
self
.
portal_slap
.
requestComputerPartition
(
software_release
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
partition_reference
=
self
.
start_requested_software_instance
.
getTitle
(),
partition_parameter_xml
=
'<marshal><dictionary id="i2"/></marshal>'
,
filter_xml
=
'<marshal><dictionary id="i2"/></marshal>'
,
state
=
'<marshal><string>started</string></marshal>'
,
shared_xml
=
'<marshal><bool>0</bool></marshal>'
,
project_reference
=
self
.
project
.
getReference
()
)
self
.
assertEqual
(
type
(
response
),
str
)
# check returned XML
got_xml
=
etree
.
tostring
(
etree
.
fromstring
(
response
),
...
...
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