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
5979e6fe
Commit
5979e6fe
authored
Nov 10, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: test: fix consistency on Hosting Subscription does not set the periodicity date
parent
61c5d678
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
40 deletions
+1
-40
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingInteractionWorkflow.py
...ents/test.erp5.testSlapOSAccountingInteractionWorkflow.py
+1
-40
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingInteractionWorkflow.py
View file @
5979e6fe
...
...
@@ -2,51 +2,12 @@
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
,
simulate
import
transaction
from
DateTime
import
DateTime
class
TestSlapOSAccountingInteractionWorkflow
(
SlapOSTestCaseMixin
):
def
beforeTearDown
(
self
):
transaction
.
abort
()
def
_test_HostingSubscription_fixConsistency
(
self
,
day
):
new_id
=
self
.
generateNewId
()
item
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
title
=
"Subscription %s"
%
new_id
,
reference
=
"TESTSUB-%s"
%
new_id
,
periodicity_hour_list
=
None
,
periodicity_minute_list
=
None
,
periodicity_month_day
=
None
,
)
self
.
assertEqual
(
item
.
getPeriodicityHour
(),
None
)
self
.
assertEqual
(
item
.
getPeriodicityMinute
(),
None
)
self
.
assertEqual
(
item
.
getPeriodicityMonthDay
(),
None
)
item
.
fixConsistency
()
self
.
assertEqual
(
item
.
getPeriodicityHourList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMinuteList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMonthDay
(),
day
)
@
simulate
(
'HostingSubscription_calculateSubscriptionStartDate'
,
'*args, **kwargs'
,
"""# Script body
from DateTime import DateTime
return DateTime('%s')
"""
%
DateTime
(
'2012/01/15'
).
ISO
())
def
test_HostingSubscription_fixConsistency
(
self
):
self
.
_test_HostingSubscription_fixConsistency
(
15
)
@
simulate
(
'HostingSubscription_calculateSubscriptionStartDate'
,
'*args, **kwargs'
,
"""# Script body
from DateTime import DateTime
return DateTime('%s')
"""
%
DateTime
(
'2012/01/29'
).
ISO
())
def
test_HostingSubscription_fixConsistency_today_after_28
(
self
):
self
.
_test_HostingSubscription_fixConsistency
(
28
)
@
simulate
(
'Delivery_calculate'
,
'*args, **kwargs'
,
"""# Script body
...
...
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