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
9faf2a58
Commit
9faf2a58
authored
Jun 09, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test: create deposit payment to validate the subscription
parent
c9641b8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
...mponents/test.erp5.testSlapOSERP5VirtualMasterScenario.py
+11
-4
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
View file @
9faf2a58
...
...
@@ -405,8 +405,8 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
currency
,
_
,
_
,
sale_person
=
self
.
bootstrapVirtualMasterTest
()
self
.
logout
()
# lets join as slapos administrator, which will
own few compute_nodes
owner_reference
=
'
owner
-%s'
%
self
.
generateNewId
()
# lets join as slapos administrator, which will
manager the project
owner_reference
=
'
project
-%s'
%
self
.
generateNewId
()
self
.
joinSlapOS
(
self
.
web_site
,
owner_reference
)
self
.
login
()
...
...
@@ -432,6 +432,9 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
self
.
login
()
project
=
self
.
portal
.
restrictedTraverse
(
project_relative_url
)
payment_transaction
=
owner_person
.
Person_addDepositPayment
(
99
*
10
,
currency
.
getRelativeUrl
(),
1
)
payment_transaction
.
PaymentTransaction_acceptDepositPayment
()
preference
=
self
.
portal
.
portal_preferences
.
slapos_default_system_preference
preference
.
edit
(
preferred_subscription_assignment_category_list
=
[
...
...
@@ -524,6 +527,9 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
portal_type
=
"ERP5 Login"
,
reference
=
public_reference
).
getParentValue
()
payment_transaction
=
public_person
.
Person_addDepositPayment
(
99
*
10
,
currency
.
getRelativeUrl
(),
1
)
payment_transaction
.
PaymentTransaction_acceptDepositPayment
()
public_instance_title
=
'Public title %s'
%
self
.
generateNewId
()
self
.
checkInstanceAllocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
...
...
@@ -575,8 +581,9 @@ class TestSlapOSVirtualMasterScenario(TestSlapOSVirtualMasterScenarioMixin):
# Check accounting
transaction_list
=
self
.
portal
.
account_module
.
receivable
.
Account_getAccountingTransactionList
(
mirror_section_uid
=
public_person
.
getUid
())
assert
len
(
transaction_list
)
==
1
,
len
(
transaction_list
)
assert
transaction_list
[
0
].
total_price
==
10.8
,
transaction_list
[
0
].
total_price
assert
len
(
transaction_list
)
==
2
,
len
(
transaction_list
)
assert
transaction_list
[
0
].
total_price
==
990.0
,
transaction_list
[
0
].
total_price
assert
transaction_list
[
1
].
total_price
==
-
990.0
,
transaction_list
[
1
].
total_price
self
.
login
()
...
...
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