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
Ivan Tyagov
slapos.core
Commits
f119b083
Commit
f119b083
authored
Nov 16, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Hosting Subscription fixConsistency.
fixConsistency can be called twice in the same transaction.
parent
055b3c78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingInteractionWorkflow.py
...stTemplateItem/testSlapOSAccountingInteractionWorkflow.py
+23
-0
master/bt5/slapos_accounting/WorkflowTemplateItem/portal_workflow/slapos_accounting_interaction_workflow/interactions/HostingSubscription_fixConsistency.xml
...kflow/interactions/HostingSubscription_fixConsistency.xml
+1
-1
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingInteractionWorkflow.py
View file @
f119b083
...
@@ -136,3 +136,26 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
...
@@ -136,3 +136,26 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
instance
.
requestStop
(
**
request_kw
)
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
def
test_HostingSubscription_fixConsistency
(
self
):
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
()
import
datetime
self
.
assertEqual
(
item
.
getPeriodicityHourList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMinuteList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMonthDay
(),
datetime
.
datetime
.
today
().
day
)
master/bt5/slapos_accounting/WorkflowTemplateItem/portal_workflow/slapos_accounting_interaction_workflow/interactions/HostingSubscription_fixConsistency.xml
View file @
f119b083
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
0
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<key>
<string>
portal_type_filter
</string>
</key>
...
...
master/bt5/slapos_accounting/bt/revision
View file @
f119b083
53
54
\ No newline at end of file
\ No newline at end of file
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