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
Lisa Casino
slapos.core
Commits
1b68f7d4
Commit
1b68f7d4
authored
Sep 13, 2019
by
Thomas Gambier
🚴🏼
Committed by
Rafael Monnerat
Sep 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: fix typos
/reviewed-on
nexedi/slapos.core!130
parent
6d7c4408
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
20 deletions
+20
-20
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionCondition_renderKVMClusterParameter.py
...equest/SubscriptionCondition_renderKVMClusterParameter.py
+2
-2
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
..._request/SubscriptionRequestModule_requestSubscription.py
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
...request/SubscriptionRequestModule_requestSubscription.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
...est/SubscriptionRequestModule_requestSubscriptionProxy.py
+0
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
...st/SubscriptionRequestModule_requestSubscriptionProxy.xml
+1
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
...al_components/test.erp5.testSlapOSSubscriptionScenario.py
+1
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+14
-14
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionCondition_renderKVMClusterParameter.py
View file @
1b68f7d4
...
...
@@ -32,10 +32,10 @@ for i in range(amount):
else
:
json_parameter
[
"kvm-partition-dict"
][
"KVM"
+
str
(
i
)]
=
KVM0
xml_parame
r
ter
=
"""
xml_parameter
=
"""
<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="_">%s</parameter>
</instance>"""
%
json
.
dumps
(
json_parameter
,
indent
=
2
)
return
xml_parame
r
ter
return
xml_parameter
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscri
t
ption.py
→
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
View file @
1b68f7d4
...
...
@@ -18,7 +18,7 @@ user_input_dict = {
"name"
:
name
,
"amount"
:
amount
}
return
context
.
SubscriptionRequestModule_requestSubscri
t
ptionProxy
(
return
context
.
SubscriptionRequestModule_requestSubscriptionProxy
(
default_email_text
,
subscription_reference
,
confirmation_required
=
bool
(
confirmation_required
),
user_input_dict
=
user_input_dict
,
batch_mode
=
0
)
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscri
t
ption.xml
→
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
View file @
1b68f7d4
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SubscriptionRequestModule_requestSubscri
t
ption
</string>
</value>
<value>
<string>
SubscriptionRequestModule_requestSubscription
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscri
t
ptionProxy.py
→
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
View file @
1b68f7d4
File moved
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscri
t
ptionProxy.xml
→
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
View file @
1b68f7d4
...
...
@@ -63,7 +63,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SubscriptionRequestModule_requestSubscri
t
ptionProxy
</string>
</value>
<value>
<string>
SubscriptionRequestModule_requestSubscriptionProxy
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
View file @
1b68f7d4
...
...
@@ -325,7 +325,7 @@ class TestSlapOSTrialScenario(DefaultScenarioMixin):
subscription_request
.
getRelativeUrl
())
@
changeSkin
(
'Hal'
)
def
_requestSubscription
(
self
,
**
kw
):
return
self
.
web_site
.
hateoas
.
SubscriptionRequestModule_requestSubscri
t
ption
(
**
kw
)
return
self
.
web_site
.
hateoas
.
SubscriptionRequestModule_requestSubscription
(
**
kw
)
def
getAggregatedSalePackingList
(
self
,
subscription_request
,
specialise
):
person_uid
=
subscription_request
.
getDestinationSectionValue
().
getUid
()
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
1b68f7d4
...
...
@@ -179,39 +179,39 @@ class TestSubscriptionCondition_renderParameter(TestSubscriptionSkinsMixin):
self
.
assertEqual
(
parameter_xml
,
subscription_condition
.
SubscriptionCondition_renderParameter
(
amount
=
1
))
class
TestSubscriptionRequestModule_requestSubscri
t
ption
(
TestSubscriptionSkinsMixin
):
class
TestSubscriptionRequestModule_requestSubscription
(
TestSubscriptionSkinsMixin
):
@
simulate
(
'SubscriptionRequestModule_requestSubscri
t
ptionProxy'
,
'*args, **kwargs'
,
'return args, kwargs'
)
def
test_SubscriptionRequestModule_requestSubscri
t
ption
(
self
):
@
simulate
(
'SubscriptionRequestModule_requestSubscriptionProxy'
,
'*args, **kwargs'
,
'return args, kwargs'
)
def
test_SubscriptionRequestModule_requestSubscription
(
self
):
module
=
self
.
portal
.
subscription_request_module
# Request is None, so it can only be called via URL
self
.
assertRaises
(
Unauthorized
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
,
REQUEST
=
None
)
self
.
assertRaises
(
Unauthorized
,
module
.
SubscriptionRequestModule_requestSubscription
,
REQUEST
=
None
)
# Method is not get
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
,
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscription
,
REQUEST
=
self
.
portal
.
REQUEST
)
# Method is not get
self
.
portal
.
REQUEST
.
other
[
'method'
]
=
"GET"
# default_email_text not defined
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
,
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscription
,
REQUEST
=
self
.
portal
.
REQUEST
)
# name not defined
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
,
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscription
,
REQUEST
=
self
.
portal
.
REQUEST
,
default_email_text
=
"123@nexedi.com"
)
# subscription_reference not defined
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
,
self
.
assertRaises
(
ValueError
,
module
.
SubscriptionRequestModule_requestSubscription
,
REQUEST
=
self
.
portal
.
REQUEST
,
default_email_text
=
"123@nexedi.com"
,
name
=
"couscous"
)
expected_argument_tuple
=
((
'123@nexedi.com'
,
'subscription_reference'
),
{
'confirmation_required'
:
True
,
'user_input_dict'
:
{
'name'
:
"couscous"
,
'amount'
:
0
},
'batch_mode'
:
0
})
self
.
assertEqual
(
expected_argument_tuple
,
module
.
SubscriptionRequestModule_requestSubscri
t
ption
(
self
.
assertEqual
(
expected_argument_tuple
,
module
.
SubscriptionRequestModule_requestSubscription
(
REQUEST
=
self
.
portal
.
REQUEST
,
default_email_text
=
"123@nexedi.com"
,
name
=
"couscous"
,
subscription_reference
=
"subscription_reference"
))
self
.
tic
()
...
...
@@ -300,14 +300,14 @@ class TestSubscriptionRequest_createUser(TestSubscriptionSkinsMixin):
self
.
assertEqual
(
erp5_login
.
getReference
(),
person
.
getUserId
())
class
Test0SubscriptionRequestModule_requestSubscri
t
ptionProxy
(
TestSubscriptionSkinsMixin
):
class
Test0SubscriptionRequestModule_requestSubscriptionProxy
(
TestSubscriptionSkinsMixin
):
def
test0SubscriptionRequestModule_requestSubscri
t
ptionProxy_raises_unauthorized
(
self
):
def
test0SubscriptionRequestModule_requestSubscriptionProxy_raises_unauthorized
(
self
):
self
.
assertRaises
(
Unauthorized
,
self
.
portal
.
subscription_request_module
.
SubscriptionRequestModule_requestSubscri
t
ptionProxy
,
self
.
portal
.
subscription_request_module
.
SubscriptionRequestModule_requestSubscriptionProxy
,
REQUEST
=
"XXXXXXXXXXX"
,
email
=
"bb"
,
subscription_reference
=
"aa"
)
def
test0SubscriptionRequestModule_requestSubscri
t
ptionProxy_redirect_to_confirmation
(
self
):
def
test0SubscriptionRequestModule_requestSubscriptionProxy_redirect_to_confirmation
(
self
):
email
=
"abc%s@nexedi.com"
%
self
.
new_id
subscription_reference
=
"test_subscription_reference"
user_input_dict
=
{
'name'
:
"Cous Cous %s"
%
self
.
new_id
,
...
...
@@ -317,7 +317,7 @@ class Test0SubscriptionRequestModule_requestSubscritptionProxy(TestSubscriptionS
self
.
tic
()
module
=
self
.
portal
.
web_site_module
.
hostingjs
.
subscription_request_module
response
=
module
.
SubscriptionRequestModule_requestSubscri
t
ptionProxy
(
response
=
module
.
SubscriptionRequestModule_requestSubscriptionProxy
(
email
=
email
,
subscription_reference
=
subscription_reference
,
confirmation_required
=
True
,
user_input_dict
=
user_input_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