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
Labels
Merge Requests
19
Merge Requests
19
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
177f34c3
Commit
177f34c3
authored
Nov 16, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that fixConsistency is called when calling an Hosting Subscription
parent
f119b083
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingInteractionWorkflow.py
...stTemplateItem/testSlapOSAccountingInteractionWorkflow.py
+31
-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 @
177f34c3
...
@@ -159,3 +159,33 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
...
@@ -159,3 +159,33 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
self
.
assertEqual
(
item
.
getPeriodicityMinuteList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMinuteList
(),
[
0
])
self
.
assertEqual
(
item
.
getPeriodicityMonthDay
(),
datetime
.
datetime
.
today
().
day
)
self
.
assertEqual
(
item
.
getPeriodicityMonthDay
(),
datetime
.
datetime
.
today
().
day
)
def
test_HostingSubscription_manageAfter
(
self
):
class
DummyTestException
(
Exception
):
pass
def
verify_fixConsistency_call
(
self
):
# Check that fixConsistency is called on hosting subscription
if
self
.
getRelativeUrl
().
startswith
(
'hosting_subscription_module/'
):
raise
DummyTestException
else
:
return
self
.
fixConsistency_call
()
# Replace serialize by a dummy method
from
Products.ERP5Type.Base
import
Base
Base
.
fixConsistency_call
=
Base
.
fixConsistency
Base
.
fixConsistency
=
verify_fixConsistency_call
try
:
# manage_afterAdd
self
.
assertRaises
(
DummyTestException
,
self
.
portal
.
hosting_subscription_module
.
newContent
,
portal_type
=
'Hosting Subscription'
)
# manage_afterClone
self
.
assertRaises
(
DummyTestException
,
self
.
portal
.
hosting_subscription_module
.
\
template_hosting_subscription
.
Base_createCloneDocument
,
batch_mode
=
1
)
finally
:
Base
.
fixConsistency
=
Base
.
fixConsistency_call
master/bt5/slapos_accounting/bt/revision
View file @
177f34c3
54
55
\ 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