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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
3b4caec0
Commit
3b4caec0
authored
Jun 14, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: create normal user with the project customer assignment
parent
88e44bb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
...al_components/test.erp5.testSlapOSSubscriptionScenario.py
+14
-5
No files found.
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
View file @
3b4caec0
...
@@ -222,7 +222,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -222,7 +222,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
self
.
admin_user
=
admin_user
self
.
admin_user
=
admin_user
def
createNormalUser
(
self
,
email
,
name
,
language
):
def
createNormalUser
(
self
,
email
,
name
,
language
,
project
):
""" Create a Normal user """
""" Create a Normal user """
normal_user_login
=
self
.
portal
.
portal_catalog
.
getResultValue
(
normal_user_login
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"ERP5 Login"
,
portal_type
=
"ERP5 Login"
,
...
@@ -248,9 +248,16 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -248,9 +248,16 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
assignment
.
open
()
assignment
.
open
()
normal_user
.
validate
()
normal_user
.
validate
()
self
.
normal_user
=
normal_user
else
:
else
:
self
.
normal_user
=
normal_user_login
.
getParentValue
()
normal_user
=
normal_user_login
.
getParentValue
()
normal_user
.
newContent
(
portal_type
=
'Assignment'
,
destination_project_value
=
project
,
function
=
'customer'
).
open
()
self
.
normal_user
=
normal_user
self
.
normal_user
.
setLanguage
(
language
)
self
.
normal_user
.
setLanguage
(
language
)
def
createChineseSubscriptionCondition
(
self
,
slave
=
False
):
def
createChineseSubscriptionCondition
(
self
,
slave
=
False
):
...
@@ -1688,7 +1695,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -1688,7 +1695,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
name
=
"ABC %s"
%
self
.
new_id
name
=
"ABC %s"
%
self
.
new_id
self
.
login
()
self
.
login
()
self
.
createNormalUser
(
default_email_text
,
name
,
language
)
self
.
createNormalUser
(
default_email_text
,
name
,
language
,
self
.
subscription_project
)
self
.
tic
()
self
.
tic
()
self
.
subscription_server
=
self
.
createPublicServerForAdminUser
()
self
.
subscription_server
=
self
.
createPublicServerForAdminUser
()
...
@@ -1715,9 +1722,10 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -1715,9 +1722,10 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
# Call as anonymous... check response?
# Call as anonymous... check response?
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
name
=
"ABC %s"
%
self
.
new_id
name
=
"ABC %s"
%
self
.
new_id
project_reference
=
self
.
subscription_project
.
getReference
()
self
.
login
()
self
.
login
()
self
.
createNormalUser
(
default_email_text
,
name
,
language
)
self
.
createNormalUser
(
default_email_text
,
name
,
language
,
self
.
subscription_project
)
self
.
tic
()
self
.
tic
()
self
.
subscription_server
=
self
.
createPublicServerForAdminUser
()
self
.
subscription_server
=
self
.
createPublicServerForAdminUser
()
...
@@ -1737,6 +1745,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -1737,6 +1745,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
software_release
=
self
.
subscription_condition
.
getUrlString
(),
software_release
=
self
.
subscription_condition
.
getUrlString
(),
software_type
=
"default"
,
software_type
=
"default"
,
partition_reference
=
"_test_subscription_scenario_with_existing_user_extra_instance"
,
partition_reference
=
"_test_subscription_scenario_with_existing_user_extra_instance"
,
project_reference
=
project_reference
)
)
self
.
non_subscription_related_instance_amount
=
1
self
.
non_subscription_related_instance_amount
=
1
...
...
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