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
ffd9672a
Commit
ffd9672a
authored
Jun 04, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test: complexify the calculation
parent
a2c10fa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
...t.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
+5
-4
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
View file @
ffd9672a
...
...
@@ -75,7 +75,7 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
with
PinnedDateTime
(
self
,
DateTime
(
'2024/01/29'
)):
public_reference
=
'public-%s'
%
self
.
generateNewId
()
self
.
joinSlapOS
(
self
.
web_site
,
public_reference
)
with
PinnedDateTime
(
self
,
DateTime
(
'2024/0
1/3
1'
)):
with
PinnedDateTime
(
self
,
DateTime
(
'2024/0
2/0
1'
)):
public_reference2
=
'public2-%s'
%
self
.
generateNewId
()
self
.
joinSlapOS
(
self
.
web_site
,
public_reference2
)
...
...
@@ -95,7 +95,7 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
public_instance_title
=
'Public title %s'
%
self
.
generateNewId
()
self
.
login
(
person_user_id
)
with
PinnedDateTime
(
self
,
DateTime
(
'2024/02/
03
'
)):
with
PinnedDateTime
(
self
,
DateTime
(
'2024/02/
10
'
)):
self
.
personRequestInstanceNotReady
(
software_release
=
software_release
,
software_type
=
software_type
,
...
...
@@ -113,7 +113,7 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
self
.
checkServiceSubscriptionRequest
(
instance_tree
)
self
.
tic
()
with
PinnedDateTime
(
self
,
DateTime
(
'2024/02/
10
'
)):
with
PinnedDateTime
(
self
,
DateTime
(
'2024/02/
25
'
)):
self
.
login
(
sale_person
.
getUserId
())
subscription_change_request
=
public_person2
.
Person_claimSlaposItemSubscription
(
instance_tree
.
getReference
(),
...
...
@@ -150,7 +150,8 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
}
inventory_list
=
self
.
portal
.
portal_simulation
.
getCurrentInventoryList
(
**
inventory_list_kw
)
self
.
assertEquals
(
1
,
len
(
inventory_list
))
self
.
assertEquals
(
-
1
,
inventory_list
[
0
].
total_quantity
)
# 1 - 0.42 (13 days of 31) - 0.1 (3 days of 31) + 1 - 0.83 (24 days of 29)
self
.
assertEquals
(
-
0.65
,
inventory_list
[
0
].
total_quantity
)
inventory_list_kw
=
{
'group_by_section'
:
False
,
...
...
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